@arcgis/core 4.31.0-next.20240605 → 4.31.0-next.20240607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arcade/functions/centroid.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/04d84f7c9c5b5a6bdf47.js +1 -0
- package/assets/esri/core/workers/chunks/17e4d9be754e9ce2cec4.js +1 -0
- package/assets/esri/core/workers/chunks/1a64e0020d12c251ad4b.js +1 -0
- package/assets/esri/core/workers/chunks/{3ec2ed6b4d2f373ed0dc.js → 1ece003ccf1c03fb42d9.js} +1 -1
- package/assets/esri/core/workers/chunks/2ee7d91cc6c1ae7f3698.js +1 -0
- package/assets/esri/core/workers/chunks/423abec9211aa6ab6502.js +1 -0
- package/assets/esri/core/workers/chunks/493851fc4b07de3fe924.js +1 -0
- package/assets/esri/core/workers/chunks/66b835a5edfcdcf21c06.js +1 -0
- package/assets/esri/core/workers/chunks/{24a02d266749a77c8ae1.js → 7866b86ebe02adf5e874.js} +17 -17
- package/assets/esri/core/workers/chunks/{d1c4d0d53614055bc173.js → c406e673d2dd7e702af0.js} +1 -1
- package/assets/esri/core/workers/chunks/{a5f467805178686b7240.js → c70683b7183458b338f8.js} +1 -1
- package/assets/esri/core/workers/chunks/fa5e171c8ce844363b6c.js +1 -0
- package/assets/esri/themes/base/widgets/_BuildingDisciplinesTree.scss +5 -138
- package/assets/esri/themes/base/widgets/_BuildingExplorer.scss +1 -9
- package/assets/esri/themes/base/widgets/_BuildingLevelPicker.scss +5 -39
- package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +2 -17
- package/assets/esri/themes/base/widgets/_Editor.scss +8 -0
- package/assets/esri/themes/base/widgets/_Sketch.scss +8 -0
- package/assets/esri/themes/base/widgets/_SketchTooltipControls.scss +1 -0
- package/assets/esri/themes/base/widgets/_SnappingControls.scss +4 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/ColorMaterial.glsl.js +1 -1
- package/chunks/ComponentShader.glsl.js +1 -1
- package/chunks/CypherLexer.js +5 -0
- package/chunks/CypherListener.js +5 -0
- package/chunks/CypherParser.js +5 -0
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/chunks/HUDMaterial.glsl.js +32 -32
- package/chunks/ImageMaterial.glsl.js +1 -1
- package/chunks/LineMarker.glsl.js +1 -1
- package/chunks/NativeLine.glsl.js +1 -1
- package/chunks/OITCompositing.glsl.js +12 -9
- package/chunks/Pattern.glsl.js +1 -1
- package/chunks/RealisticTree.glsl.js +1 -1
- package/chunks/RibbonLine.glsl.js +1 -1
- package/chunks/ShadedColorMaterial.glsl.js +1 -1
- package/chunks/WaterSurface.glsl.js +1 -1
- package/chunks/antlr4.web.js +5 -0
- package/layers/LinkChartLayer.js +1 -1
- package/layers/knowledgeGraph/antlr/BindParamsListener.js +5 -0
- package/layers/knowledgeGraph/antlr/SimpleErrorListener.js +5 -0
- package/layers/knowledgeGraph/cypherUtils.js +5 -0
- package/layers/knowledgeGraph/supportUtils.js +1 -1
- package/layers/support/rasterFunctions/AspectFunction.js +1 -1
- package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
- package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
- package/layers/support/rasterFunctions/RemapFunction.js +1 -1
- package/layers/support/rasterFunctions/SlopeFunction.js +1 -1
- package/libs/linkchartlayout/LinkChartLayout.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/support/HighlightOptions.js +1 -1
- package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/support/HighlightOptions.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileAgent.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/terrain/tileUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlphaBlend.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OITCompositing.glsl.js +1 -1
- package/views/support/HighlightDefaults.js +5 -0
- package/views/support/HighlightOptions.js +5 -0
- package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesViewModel.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/Label.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/LevelItem.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/css.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhasePicker/css.js +5 -0
- package/widgets/BuildingExplorer/support/LayerTreeNode.js +1 -1
- package/widgets/BuildingExplorer.js +1 -1
- package/widgets/support/legacyIcon.js +1 -1
- package/assets/esri/core/workers/chunks/3841ef7007eda2f3a7a4.js +0 -1
- package/assets/esri/core/workers/chunks/4ccf7a2b36e0b8b26736.js +0 -1
- package/assets/esri/core/workers/chunks/a111eb0ae78a9f5be981.js +0 -1
- package/assets/esri/core/workers/chunks/b57a5055b9956433dac2.js +0 -1
- package/assets/esri/core/workers/chunks/b9e4e2451108cad75bfd.js +0 -1
- package/assets/esri/core/workers/chunks/f9774ba48f3aa3b8fac4.js +0 -1
- package/assets/esri/core/workers/chunks/fa8b00135363c450de16.js +0 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightDefaults.js +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6289],{9775:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(62788),s=n(95488);class i{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new s.I,this._items=new Set}get length(){return(0,r.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,r.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,r.gc)(this._observable),yield*this._items}}},75503:(e,t,n)=>{n.d(t,{w:()=>o});var r=n(4576),s=(n(44208),n(3694)),i=n(11006);class o{constructor(e=9,t){this._compareMinX=d,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(),b.prune(),v.prune(),M.prune(),I.prune()}all(e){a(this._data,e)}search(e,t){let n=this._data;const r=this._toBBox;if(_(e,n))for(b.clear();n;){for(let s=0,i=n.children.length;s<i;s++){const i=n.children[s],o=n.leaf?r(i):i;_(e,o)&&(n.leaf?t(i):g(e,o)?a(i,t):b.push(i))}n=b.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!_(e,t))return!1;for(b.clear();t;){for(let r=0,s=t.children.length;r<s;r++){const s=t.children[r],i=t.leaf?n(s):s;if(_(e,i)){if(t.leaf||g(e,i))return!0;b.push(s)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),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,n=this._data,s=null,i=0,o=!1;const a=this._toBBox(e);for(M.clear(),I.clear();n||M.length>0;){if(n||(n=M.pop(),s=M.data[M.length-1],i=I.pop()??0,o=!0),n.leaf&&(t=(0,r.qh)(n.children,e,n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),M.push(n),this._condense(M),this;o||n.leaf||!g(n,a)?s?(i++,n=s.children[i],o=!1):n=null:(M.push(n),I.push(i),i=0,s=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,r){const s=n-t+1;let i=this._maxEntries;if(s<=i){const r=new A(e.slice(t,n+1));return l(r,this._toBBox),r}r||(r=Math.ceil(Math.log(s)/Math.log(i)),i=Math.ceil(s/i**(r-1)));const o=new E([]);o.height=r;const a=Math.ceil(s/i),u=a*Math.ceil(Math.sqrt(i));w(e,t,n,u,this._compareMinX);for(let s=t;s<=n;s+=u){const t=Math.min(s+u-1,n);w(e,s,t,a,this._compareMinY);for(let n=s;n<=t;n+=a){const s=Math.min(n+a-1,t);o.children.push(this._build(e,n,s,r-1))}}return l(o,this._toBBox),o}_insert(e,t,n){const r=this._toBBox,s=n?e:r(e);M.clear();const i=function(e,t,n,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==n;){let n,r=1/0,s=1/0;for(let i=0,o=t.children.length;i<o;i++){const o=t.children[i],a=c(o),l=f(e,o)-a;l<s?(s=l,r=a<r?a:r,n=o):l===s&&a<r&&(r=a,n=o)}t=n||t.children[0]}return t}(s,this._data,t,M);for(i.children.push(e),p(i,s);t>=0&&M.data[t].children.length>this._maxEntries;)this._split(M,t),t--;!function(e,t,n){for(let r=n;r>=0;r--)p(t.data[r],e)}(s,M,t)}_split(e,t){const n=e.data[t],r=n.children.length,s=this._minEntries;this._chooseSplitAxis(n,s,r);const i=this._chooseSplitIndex(n,s,r);if(!i)return;const o=n.children.splice(i,n.children.length-i),a=n.leaf?new A(o):new E(o);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new E([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,s,i;r=s=1/0;for(let o=t;o<=n-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,n,this._toBBox),l=m(t,a),p=c(t)+c(a);l<r?(r=l,i=o,s=p<s?p:s):l===r&&p<s&&(s=p,i=o)}return i}_chooseSplitAxis(e,t,n){const r=e.leaf?this._compareMinX:d,s=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,s)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const s=this._toBBox,i=u(e,0,t,s),o=u(e,n-t,n,s);let a=y(i)+y(o);for(let r=t;r<n-t;r++){const t=e.children[r];p(i,e.leaf?s(t):t),a+=y(i)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];p(o,e.leaf?s(t):t),a+=y(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const s=e.data[t-1],i=s.children;i.splice((0,r.qh)(i,n,i.length,s.indexHint),1)}else this.clear();else l(n,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 n=e;for(v.clear();n;){if(!0===n.leaf)for(const e of n.children)t(e);else v.pushArray(n.children);n=v.pop()??null}}function l(e,t){u(e,0,e.children.length,t,e)}function u(e,t,n,r,s){s||(s=new A([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let i,o=t;o<n;o++)i=e.children[o],p(s,e.leaf?r(i):i);return s}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 d(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 f(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 m(e,t){const n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),s=Math.min(e.maxX,t.maxX),i=Math.min(e.maxY,t.maxY);return Math.max(0,s-n)*Math.max(0,i-r)}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 w(e,t,n,r,s){const o=[t,n];for(;o.length;){const t=o.pop(),n=o.pop();if(t-n<=r)continue;const a=n+Math.ceil((t-n)/r/2)*r;(0,i.q)(e,a,n,t,s),o.push(n,a,a,t)}}const b=new s.A,v=new s.A,M=new s.A,I=new s.A({deallocator:void 0});class x{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class T extends x{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class A extends T{constructor(e){super(),this.children=e,this.leaf=!0}}class E extends T{constructor(e){super(),this.children=e,this.leaf=!1}}},39516:(e,t,n)=>{async function r(e,t){const{WhereClause:r}=await Promise.all([n.e(835),n.e(4800)]).then(n.bind(n,50835));return r.create(e,t)}function s(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}n.d(t,{G:()=>r,m:()=>s})},10382:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(36563),s=(n(44208),n(74887)),i=n(9775),o=n(72457),a=n(52268),l=n(61322);class u{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(((n,r)=>{let i=!0;const o=e=>{(0,s.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,s.$X)(a)?this._clientPromises[i]=a.then((e=>(this._clients[i]=new l.default(e,t,this._ongoingJobsQueue),o(n),this._clients[i])),(()=>(o(r),null))):(this._clients[i]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[i]=Promise.resolve(this._clients[i]),o(n))}}))}broadcast(e,t,n){const r=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const i=this._clientPromises[s];r[s]=i.then((r=>r?.invoke(e,t,n)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,s.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,n){return this.apply(e,[t],n)}apply(e,t,n){const r=(0,s.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:n,resolver:r});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 r.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.vE)(this._clients.map((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((s=>{s&&(t[r]=s.openPort()),0==--n&&e(t)}))}))}get test(){}}},72457:(e,t,n)=>{n.d(t,{h:()=>i,k:()=>s});const r=new FinalizationRegistry((e=>{e.close()}));function s(e,t){r.register(e,t,t)}function i(e){r.unregister(e)}},29953:(e,t,n)=>{n.d(t,{ho:()=>G});var r=n(49186),s=n(44208),i=n(74887),o=n(10382),a=n(72457),l=n(61322),u=n(53966),p=n(97768),d=n(78888),h=n(84952);const c={async request(e,t){const n=e.options,r=n.responseType;n.signal=t?.signal,n.responseType="native"===r||"native-request-init"===r?"native-request-init":r&&["blob","json","text"].includes(r)&&(0,h.sC)(e.url)?.after?r:"array-buffer";const s=await(0,d.A)(e.url,n),i={data:s.data,httpStatus:s.httpStatus,ssl:s.ssl};switch(s.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=n(8341),f=n(2741),m=n(92602),g=(n(47566),n(70333));const _={};var w=n(26390);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...n)=>e[t](...n)}))}}class v{constructor(){this._dispatcher=new b,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,w.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,n){this._dispatcher.addEventListener(e,t,n)}removeEventListener(e,t,n){this._dispatcher.removeEventListener(e,t,n)}_workerPostMessage(e){(0,w.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:n}=t;let r=await l.default.loadWorker(e);r||(r=await import(e));const s=l.default.connect(r);this._workerPostMessage({type:y.Go.OPENED,jobId:n,data:s})}}}var M=n(73444),I=n(18357);const x=()=>u.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:T}=y.Go;let A,E;const k="Failed to create Worker. Fallback to execute module in main thread";async function S(e){return new Promise((t=>{function n(s){const i=(0,y.VI)(s);i&&i.type===T&&(e.removeEventListener("message",n),e.removeEventListener("error",r),t(e))}function r(t){t.preventDefault(),e.removeEventListener("message",n),e.removeEventListener("error",r),x().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new v).addEventListener("message",n),e.addEventListener("error",r)}e.addEventListener("message",n),e.addEventListener("error",r)}))}let N=0;const{ABORT:R,INVOKE:D,OPEN:j,OPENED:L,RESPONSE:C}=y.Go;class O{static async create(e){const t=await async function(){if(!(0,s.A)("esri-workers"))return S(new v);if(!A&&!E)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!=m.A.default){const t={...m.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(m.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,M.JK)(),e.has={"esri-csp-restrictions":(0,s.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,s.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,s.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,s.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,s.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,s.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,s.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,s.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,s.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,s.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,s.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,s.A)("esri-atomics"),"esri-shared-array-buffer":(0,s.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,s.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,s.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,s.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,f.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=m.A.workers.loaderConfig,n=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{..._.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,M.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),r={buildDate:I.$,fullVersion:g.ol,revision:I.u};return JSON.stringify({esriConfig:e,loaderConfig:n,kernelInfo:r})}());A=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){E=e||{}}let e;if(A)try{e=new Worker(A,{name:"esri-worker-"+N++})}catch(t){x().warn(k,E),e=new v}else x().warn(k,E),e=new v;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(),u.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:n}=t,r=(0,y.Jc)();return new Promise(((t,s)=>{const o={resolve:t,reject:s,abortHandle:(0,i.NY)(n,(()=>{this._outJobs.delete(r),this._post({type:R,jobId:r})}))};this._outJobs.set(r,o),this._post({type:j,jobId:r,modulePath:e})}))}_onMessage(e){const t=(0,y.VI)(e);if(t)switch(t.type){case L:this._onOpenedMessage(t);break;case C:this._onResponseMessage(t);break;case R:this._onAbortMessage(t);break;case D:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,n=e.jobId,r=t.get(n);r&&(r.controller&&r.controller.abort(),t.delete(n))}_onInvokeMessage(e){const{methodName:t,jobId:n,data:r,abortable:s}=e,o=s?new AbortController:null,a=this._inJobs,l=c[t];let u;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);u=l.call(null,r,{signal:o?o.signal:null})}catch(e){return void this._post({type:C,jobId:n,error:(0,y.mF)(e)})}(0,i.$X)(u)?(a.set(n,{controller:o,promise:u}),u.then((e=>{a.has(n)&&(a.delete(n),this._post({type:C,jobId:n},e))}),(e=>{a.has(n)&&(a.delete(n),e||(e={message:"Error encountered at method"+t}),(0,i.zf)(e)||this._post({type:C,jobId:n,error:(0,y.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:C,jobId:n},u)}_onOpenedMessage(e){const{jobId:t,data:n}=e,r=this._outJobs.get(t);r&&(this._outJobs.delete(t),(0,p.xt)(r.abortHandle),r.resolve(n))}_onResponseMessage(e){const{jobId:t,error:n,data:s}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,p.xt)(i.abortHandle),n?i.reject(r.A.fromJSON(JSON.parse(n))):i.resolve(s))}_post(e,t,n){return(0,y.u1)(this.worker,e,t,n)}}const B=(0,s.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,s.A)("workers-pool-size")):0;let P=(0,s.A)("esri-mobile")?Math.min(B,3):B;P||(P=(0,s.A)("safari")&&(0,s.A)("mac")?7:2);let Z=0;const F=[];async function q(e,t){const n=new o.A,{registryTarget:r,...s}=t;return await n.open(e,s),r&&(0,a.k)(r,n),n}async function G(e,t={}){if("string"!=typeof e)throw new r.A("workers:undefined-module","modulePath is missing");let n=t.strategy||"distributed";if((0,s.A)("host-webworker")&&!(0,s.A)("esri-workers")&&(n="local"),"local"===n){let n=await l.default.loadWorker(e);n||(n=await import(e)),(0,i.Te)(t.signal);const r=t.client||n;return q([l.default.connect(n,t.schedule)],{...t,client:r})}if(await async function(){if(J)return J;$=new AbortController;const e=[];for(let t=0;t<P;t++){const n=O.create(t).then((e=>(F[t]=e,e)));e.push(n)}return J=Promise.all(e),J}(),(0,i.Te)(t.signal),"dedicated"===n){const n=Z++%P;return q([await F[n].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const n=Math.min(t.maxNumWorkers,P);if(n<P){const r=new Array(n);for(let s=0;s<n;++s){const n=Z++%P;r[s]=F[n].open(e,t)}return q(r,t)}}return q(F.map((n=>n.open(e,t))),t)}let $,J=null},17136:(e,t,n)=>{n.d(t,{el:()=>M});var r=n(92602),s=n(49186),i=n(53966),o=n(39829),a=n(82799),l=n(80754),u=n(21325),p=n(28735),d=(n(59456),n(78888)),h=n(65864),c=n(2272),y=n(84952),f=n(92300);const m=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function w(e,t,n){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 m().error(e),new s.A(e)}const n=(0,l.r8)(e),r=[];for(const e of n){const n=[];r.push(n),n.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const s=e[r][0],i=e[r][1],o=e[r+1][0],a=e[r+1][1],l=Math.sqrt((o-s)*(o-s)+(a-i)*(a-i)),u=(a-i)/l,p=(o-s)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,o=p*r+s,a=u*r+i;n.push([o,a])}const e=(l+Math.floor(d-1)*t)/2,r=p*e+s,o=u*e+i;n.push([r,o])}n.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:r,spatialReference:e.spatialReference}):new a.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return n&&(e=(0,l.kS)(e,n)),e}function b(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,l.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,l.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,l.kd)(r,t);e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=(0,l.kd)(r,n);e=e.clone().offset(t*(-2*n),0)}}return e}function v(e,t){let n=-1;for(let r=0;r<t.cutIndexes.length;r++){const s=t.cutIndexes[r],i=t.geometries[r],o=(0,l.r8)(i);for(let e=0;e<o.length;e++){const t=o[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const r=t[e][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*(0,l.kd)(n,180);for(let n=0;n<t.length;n++){const t=i.getPoint(e,n);i.setPoint(e,n,t.clone().offset(r,0))}return!0}}))}if(s===n){if(g(e))for(const t of(0,l.r8)(i))e[s]=e[s].addRing(t);else if(_(e))for(const t of(0,l.r8)(i))e[s]=e[s].addPath(t)}else n=s,e[s]=i}return e}async function M(e,t,n){if(!Array.isArray(e))return M([e],t);t&&"string"!=typeof t&&m().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let i,g,_,I,x,T,A,E,k=0;const S=[],N=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,g=(0,u.Vp)(i),_=i.isWebMercator,T=_?102100:4326,I=l.j7[T].maxX,x=l.j7[T].minX,A=l.j7[T].plus180Line,E=l.j7[T].minus180Line),g)if("mesh"===t.type)N.push(t);else if("point"===t.type)N.push(b(t.clone(),I,x));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,I,x))),N.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);N.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,n=(0,l.kd)(e.xmin,x)*(2*I);let r=0===n?t.clone():(0,l.kS)(t.clone(),n);e.offset(n,0);let{xmin:s,xmax:i}=e;s=Number(s.toFixed(9)),i=Number(i.toFixed(9)),e.intersects(A)&&i!==I?(k=i>k?i:k,r=w(r,_),S.push(r),N.push("cut")):e.intersects(E)&&s!==x?(k=i*(2*I)>k?i*(2*I):k,r=w(r,_,360),S.push(r),N.push("cut")):N.push(r)}else N.push(t.clone());else N.push(t);else N.push(t);let R=(0,l.kd)(k,I),D=-90;const j=R,L=new a.A;for(;R>0;){const e=360*R-180;L.addPath([[e,D],[e,-1*D]]),D*=-1,R--}if(S.length>0&&j>0){const t=v(S,await async function(e,t,n,r){const s=(0,c.Dl)(e),i=t[0].spatialReference,o={...r,responseType:"json",query:{...s.query,f:"json",sr:(0,u.YX)(i),target:JSON.stringify({geometryType:(0,h.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},a=await(0,d.A)(s.path+"/cut",o),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,h.rS)(e);return t.spatialReference=i,t}))}}(s,S,L,n)),r=[],i=[];for(let n=0;n<N.length;n++){const s=N[n];if("cut"!==s)i.push(s);else{const s=t.shift(),o=e[n];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&s.rings.length>=o.rings.length?(r.push(s),i.push("simplify")):i.push(_?(0,p.Gh)(s):s)}}if(!r.length)return i;const o=await async function(e,t,n){const r="string"==typeof e?(0,y.An)(e):e,s=t[0].spatialReference,i=(0,h.$B)(t[0]),o={...n,query:{...r.query,f:"json",sr:(0,u.YX)(s),geometries:JSON.stringify((0,f.X)(t))}},{data:a}=await(0,d.A)(r.path+"/simplify",o);return(0,f.V)(a.geometries,i,s)}(s,r,n),a=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?a.push(t):a.push(_?(0,p.Gh)(o.shift()):o.shift())}return a}const C=[];for(let e=0;e<N.length;e++){const t=N[e];if("cut"!==t)C.push(t);else{const e=S.shift();C.push(!0===_?(0,p.Gh)(e):e)}}return C}},80754:(e,t,n)=>{n.d(t,{j7:()=>o,kS:()=>l,kd:()=>a,r8:()=>u});var r=n(82799),s=n(16930),i=n(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=u(e);for(const e of n)for(const n of e)n[0]+=t;return e}function u(e){return(0,i.Bi)(e)?e.rings:e.paths}},6518:(e,t,n)=>{n.d(t,{F:()=>a});var r=n(44208),s=n(75503),i=n(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 s.w(9,(0,r.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(((n,r)=>{e[t++]=r})),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,n){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,n)}(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,n)=>{n.d(t,{A:()=>y});var r=n(4576),s=n(49186),i=n(65529),o=n(53966),a=n(70328),l=n(19419),u=n(90708),p=n(6518),d=n(51441),h=n(37730);const c=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new p.F,this._featuresById=new Map,this._markedIds=new Set,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,n,r,s]=this.fullBounds;return{xmin:t,ymin:n,xmax:r,ymax:s,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(r.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 n of e){const e=this._boundsStore.get(n.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))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,n)=>{this._markedIds.has(n)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_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 s.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let r;if(this._markedIds.add(t),n?(e.displayId=n.displayId,r=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);r=(0,u.jQ)(null!=r?r:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=r&&this._boundsStore.set(t,r),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 s.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const n=this._featuresById.get(t);if(!n)return this._add(e),e;this._markedIds.add(t);const{geometry:r,attributes:i}=e;for(const e in i)n.attributes[e]=i[e];return r&&(n.geometry=r,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),r,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),n}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},64714:(e,t,n)=>{n.d(t,{F0:()=>a,Vx:()=>p,e2:()=>h,f:()=>c});var r=n(44208),s=n(4718),i=n(99352),o=n(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,r.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this${d(t)} = null;`;for(const t in e)n+=`this${d(t)} = ${JSON.stringify(e[t])};`;const r=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new r}catch(n){return()=>({[t]:null,...e})}}function d(e){return l.test(e)?`.${e}`:`["${e}"]`}function h(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.o8)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},61184:(e,t,n)=>{n.d(t,{PB:()=>k,d4:()=>E,ZL:()=>T,sZ:()=>A,yC:()=>I,Vr:()=>x});var r=n(90237),s=(n(59456),n(69622)),i=n(49186),o=n(53966),a=n(91869),l=n(39516),u=n(10107),p=(n(44208),n(87811),n(40608)),d=n(39829),h=n(57251),c=n(21325),y=n(90708),f=n(43334),m=n(65864);class g{constructor(){this._featureLookup=new Map}static getInstance(){return g.instance||(g.instance=new g),g.instance}static resetInstance(){g.instance&&(g.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const n=this.readFromStoreById(e);n&&t.push(n)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,n){const r=[];return e.forEach((e=>{if(!e?.id)return;e.properties||(e.properties=[]);let s,i=null;if(n&&e.properties[n]&&(i=(0,y.Ux)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties.ESRI__ORIGIN_ID=e.originId,e.properties.ESRI__DESTINATION_ID=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const r=this._featureLookup.get(e.id),o=JSON.parse(JSON.stringify(Object.assign(r.attributes,e.properties)));n&&e.properties[n]&&(o[n]=(0,m.rS)(e.properties[n])),s=new f.Om(i?JSON.parse(JSON.stringify(i)):r?.geometry?JSON.parse(JSON.stringify(r.geometry)):null,o,null,e.properties[t])}else s=new f.Om(i?JSON.parse(JSON.stringify(i)):null,e.properties,null,e.properties[t]);this._featureLookup.set(e.id,s),r.push(s)})),r}}var _=n(45654),w=n(71932),b=n(42538),v=n(61956),M=n(5443);const I="ESRI__ID",x="ESRI__ORIGIN_ID",T="ESRI__DESTINATION_ID",A="ESRI__LAYOUT_GEOMETRY",E="ESRI__AGGREGATION_COUNT";let k=class extends s.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((n=>{n.name&&(t.set(n.name,"entity"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(n.name),n.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((n=>{n.name&&(t.set(n.name,"relationship"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(n.name),n.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((n,r)=>{if("entity"===t.get(r))this.entityTypeNames.add(r);else{if("relationship"!==t.get(r))return o.A.getLogger(this).warn(`A named type, ${r}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(r);this.relationshipTypeNames.add(r)}const s=new Map;n.members?.forEach((e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,(()=>new Set)).add(r);const t=this.getById(e.id);t&&s.set(e.id,t)})),this.sublayerCaches.set(r,s)}))}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 n=this.inclusionModeDefinition.namedTypeDefinitions.get(e);n.members||(n.members=new Map),n.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}))}getById(e){return g.getInstance().readFromStoreById(e)}async getData(e,t,n){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let r;if(r=e||new v.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,n=this._processingCacheUpdatesLookup.get(t.objectType.name??""),s=r.outFields;s&&1===s.length&&s[0]===I&&"1=1"===r.where||await Promise.all(n??[]);const i=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return i.forEach((n=>{this.relationshipTypeNames.has(t.objectType.name)?n.geometry=e.relationshipLinkChartDiagramLookup.get(n.attributes[t.objectIdField]):n.geometry=e.entityLinkChartDiagramLookup.get(n.attributes[t.objectIdField]),n.attributes[A]=n.geometry,o.push(n)})),o}return this.retrieveDataFromService(r,t,n)}async getConnectedRecordIds(e,t){const n=[];let r="";const s=[],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)r=r+e+"|";r=r.slice(0,-1)}return i.forEach(((e,i)=>{let a;a=t&&0!==t?.length?`MATCH (n:${i})-[r:${r}]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`:`MATCH (n:${i})-[r]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`;const l=new Promise((t=>{(async()=>{const t=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new b.A({openCypherQuery:a,bindParameters:{ids:e}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;for(let e=0;e<r.length;e++){const t=r[e];n.push({id:t[0],typeName:t[1]}),n.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((()=>{t()}))}));s.push(l)})),this.refreshCacheContent(),await Promise.all(s),n}async getRelationshipsBetweenNodes(e,t){const n=[],r=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new b.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 r.read();if(e)break;for(let e=0;e<t.length;e++){const r=t[e];n.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 n}async getRelationshipsFromNodes(e,t,n){const r=[],s=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new b.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:n}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await s.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];r.push({id:n[0],typeName:n[1]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}return r}async refreshCacheContent(e,t,n,r=!0){const s=g.getInstance(),o=[],l=new Map,u=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&u.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&u.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 d,h="",c=!1;if(t||u.get(e)?.properties?.forEach((e=>{e.name&&o.add(e.name)})),n&&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)}))}d=new b.A(p?{openCypherQuery:h,bindParameters:{ids:p}}:{openCypherQuery:h});const y=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,d)).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await y.read();if(t)break;const i=[];for(let e=0;e<n.length;e++){const t=n[e];let r=0,s=0;const o={properties:{}};for(o.id=t[r],r++,s++,c&&(o.originId=t[r],r++,s++,o.destinationId=t[r],r++,s++,(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])));r<t.length;r++)o.properties[l[r-s]]=t[r];i.push(o)}const o=s.writeToStore(i,I,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const u=this.sublayerCaches.get(e);o.forEach((t=>{u?.set(t.attributes[I],t),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[I])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[I],{id:t.attributes[I]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[I],(()=>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,n=new Set(e.map((e=>e.id)));for(const n of e)t.add(n.typeName),1===this.memberIdTypeLookup.get(n.id)?.size?this.memberIdTypeLookup.delete(n.id):this.memberIdTypeLookup.get(n.id)?.delete(n.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{t===n.typeName&&e.members?.has(n.id)&&e.members.delete(n.id)}));t.forEach((e=>{this.sublayerCaches.get(e)?.forEach(((t,r)=>{n.has(r)&&this.sublayerCaches.get(e)?.delete(r)}))}))}async retrieveDataFromService(e,t,n){const r=g.getInstance(),s=new Set,o=[];let a,u="",p=[];const y="relationship"===t.graphType,f=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,m=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let v=!f&&m?Array.from(m).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(v=e.objectIds);else if(null!=e.objectIds&&v&&v.length>0){const t=e.objectIds;e.objectIds=v.filter((e=>t.includes(e)))}else if(null!=e.objectIds)v=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=v}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach((e=>{s.add(e.name)})):n.forEach((e=>{e!==I&&e!==t.geometryFieldName&&s.add(e)}))}if(null!=e.geometry){const n=e.geometry;let r;const p=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,f=p?.spatialReference,m=p?.serviceCapabilities?.geometryCapabilities;let g=m?.geometryMaxBoundingRectangleSizeX,w=m?.geometryMaxBoundingRectangleSizeY;if(n?.extent?.spatialReference&&!n.spatialReference?.isWGS84?(await(0,h.initializeProjection)(n.extent.spatialReference,c.KK),r=(0,h.project)(n.extent,c.KK)):r=n.extent,g&&w&&f){if(4326!==f.wkid){const e=new M.A({spatialReference:f,xmax:g,ymax:w}),t=(0,h.project)(e,c.KK);g=t.xmax,w=t.ymax}if(r.xmax-r.xmin>g)throw new i.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(r.ymax-r.ymin>w)throw new i.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${w}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,l.G)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{n.fieldNames.includes(e.name)&&s.add(e.name)}))}u=y?`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&&s.add(t.geometryFieldName),s.forEach((e=>{u+=`, n.${e}`,o.push(e)})),a=new b.A({openCypherQuery:u,bindParameters:{param_filter_geom:new d.A({rings:(0,_.DX)(r)})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const r=await(0,l.G)(e.where,t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&s.add(e.name)}));const i=new Set(["column-reference","string","number","binary-expression"]),o=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const u=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`${u(e.left)} ${e.operator} ${u(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 n=e.right.value;"%"===n.charAt(0)&&(n=n.slice(1)),"%"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),t+=`'${n.toLowerCase()}')`}return t}return a=!0,""};n=u(r.parseTree),a&&(n="")}let r="";r=y?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let i=!1;v&&(i=!0,r+=" WHERE ID(n) IN $ids"),n&&(r+=i?" AND":" WHERE",r+=` ${n}`),r+=" return ID(n)",y&&(r+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&s.add(t.geometryFieldName),s.forEach((e=>{r+=`, n.${e}`,o.push(e)})),a=new b.A(v?{openCypherQuery:r,bindParameters:{ids:v}}:{openCypherQuery:r})}const x=(await(0,w.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,n)).resultRowsStream.getReader();for(;;){const{done:e,value:n}=await x.read();if(e)break;const s=[];for(let e=0;e<n.length;e++){const t=n[e];let r=0,i=0;const a={properties:{}};for(a.id=t[r],r++,i++,y&&(a.originId=t[r],r++,i++,a.destinationId=t[r],r++,i++);r<t.length;r++)a.properties[o[r-i]]=t[r];s.push(a)}p=p.concat(r.writeToStore(s,I,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return p}};(0,r._)([(0,u.MZ)()],k.prototype,"knowledgeGraph",void 0),(0,r._)([(0,u.MZ)()],k.prototype,"inclusionModeDefinition",void 0),(0,r._)([(0,u.MZ)()],k.prototype,"entityTypeNames",void 0),(0,r._)([(0,u.MZ)()],k.prototype,"relationshipTypeNames",void 0),(0,r._)([(0,u.MZ)()],k.prototype,"geographicLookup",void 0),(0,r._)([(0,u.MZ)()],k.prototype,"sublayerCaches",void 0),(0,r._)([(0,u.MZ)()],k.prototype,"nodeConnectionsLookup",void 0),(0,r._)([(0,u.MZ)()],k.prototype,"relationshipConnectionsLookup",void 0),(0,r._)([(0,u.MZ)()],k.prototype,"memberIdTypeLookup",void 0),k=(0,r._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],k)},70643:(e,t,n)=>{n.d(t,{A:()=>H});var r=n(90237),s=(n(59456),n(13874)),i=(n(86162),n(94409),n(65345),n(42980),n(39290),n(92438),n(96576),n(93618),n(65494)),o=n(15036),a=n(4718),l=n(92071),u=(n(29953),n(10107)),p=(n(44208),n(53966),n(40608)),d=n(43937),h=n(35666),c=n(57251),y=n(16930),f=n(21325),m=n(4146),g=n(83221),_=n(17970),w=n(64714),b=n(61184);n(87811);const v=(0,n(17036).p)(),M=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,r._)([(0,u.MZ)(v.fields)],t.prototype,"fields",void 0),(0,r._)([(0,u.MZ)(v.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,r._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};var I=n(63074),x=n(87718),T=n(76294),A=n(32756),E=n(54310),k=n(25036),S=n(82935),N=n(10873),R=n(13213),D=n(20437),j=n(30524),L=n(81457),C=n(39383),O=n(22671),B=n(61956),P=n(30291),Z=n(61322),F=n(5443),q=n(39829),G=n(82799),$=n(50498);function J(e){if(!e.json)return e;e.json.write=Y(e.json.write);const t=e.json.origins;if(!t)return e;let n;for(n in t){const e=t[n];e&&(e.write=Y(e.write))}return e}function Y(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:n,overridePolicy:r,...s}=e;return function(e,t){const n=Q.call(this,e,t);return n.enabled?{...s,...n}:n}}(e)),e):!0===e?V():e}function V(){return{overridePolicy:Q}}function Q(e,t){const n=!!this.geometryType;let r={enabled:n};return n&&(r={...r,...X.call(this,e,t)}),r}function X(e,t){return{ignoreOrigin:this.originIdOf(t)>h.Gr.DEFAULTS}}let U=class extends(M((0,T.J)((0,x.F)((0,I.dM)((0,A.f)((0,S.e)((0,k.j)((0,E.J)((0,l.P)(m.A)))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=(0,w.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=b.yC,this.objectType=null,this.opacity=1,this.orderBy=null,this.parentCompositeLayer=null,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new Z.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const n=B.A.fromJSON(e);return this.queryFeaturesJSON(n,t)}}}),[e.port2]}))},this.title=null,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 n="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(D.A.fromJSON({name:t.name,type:n,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))})),e.push(D.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),D.A.fromJSON({name:b.d4,type:"esriFieldTypeInteger",alias:b.d4,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?$.g.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return b.sZ;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,n=t?this.objectType?.properties?.[t]:null;return n?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.hasZ??!1}set renderer(e){(0,j.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,w.F0)($.g.toJSON("polyline")).renderer):(0,i.r)((0,w.F0)($.g.toJSON("point")).renderer):(0,i.r)((0,w.F0)($.g.toJSON(this.geometryType)).renderer)}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??y.A.WGS84}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return(0,P.tn)(this,e)}createQuery(){return new B.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:n,queryEngine:r}=await this._setupQueryObjects(e),s=O.A.fromJSON(await r.executeQuery(n.toJSON(),t?.signal));return s.features.forEach((e=>{e.sourceLayer=this})),s}async queryFeaturesJSON(e,t){const{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(e);return await r.executeQuery(n.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(e);return r.executeQueryForCount(n.toJSON(),t?.signal)}async queryExtent(e={},t){const n={...e,returnGeometry:!0},{resolvedQuery:r,queryEngine:s}=await this._setupQueryObjects(n),i=await s.executeQueryForExtent(r.toJSON(),t?.signal);let o;return o=null!=i.extent?.xmin&&null!=i.extent?.xmax&&null!=i.extent?.ymin&&null!=i.extent?.ymax?new F.A(i.extent):new F.A,{count:i.count,extent:o}}async queryObjectIds(e,t){const n=B.A.from(e);let r;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)r=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);r=this.loadQueryEngine(e)}return r.executeQueryForIds(n.toJSON(),t?.signal)}loadQueryEngine(e){const t=new g.A({geometryType:$.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=new _.d({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:$.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new B.A({where:"1=1",outFields:[b.yC]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const n=B.A.from(e),r=n.geometry;let s;if(r&&!r.spatialReference?.isWGS84&&(await(0,c.initializeProjection)(r.spatialReference,f.KK),n.geometry=(0,c.project)(r instanceof q.A||r instanceof G.A?r:r.extent,f.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)s=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);s=this.loadQueryEngine(e)}return{resolvedQuery:n,queryEngine:s}}};(0,r._)([(0,u.MZ)(J((0,a.o8)(I.sU)))],U.prototype,"blendMode",void 0),(0,r._)([(0,u.MZ)()],U.prototype,"capabilities",void 0),(0,r._)([(0,u.MZ)({json:{origins:{"web-scene":{write:!1}},write:V()}})],U.prototype,"charts",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],U.prototype,"defaultPopupTemplate",null),(0,r._)([(0,u.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],U.prototype,"definitionExpression",void 0),(0,r._)([(0,u.MZ)()],U.prototype,"displayField",void 0),(0,r._)([(0,u.MZ)(J((0,a.o8)(I.LF)))],U.prototype,"effect",void 0),(0,r._)([(0,u.MZ)()],U.prototype,"elevationInfo",void 0),(0,r._)([(0,u.MZ)(J((0,a.o8)(x.Y)))],U.prototype,"featureEffect",void 0),(0,r._)([(0,u.MZ)(J((0,a.o8)(R.d)))],U.prototype,"featureReduction",null),(0,r._)([(0,u.MZ)()],U.prototype,"fields",null),(0,r._)([(0,u.MZ)()],U.prototype,"geometryType",null),(0,r._)([(0,u.MZ)()],U.prototype,"geometryFieldName",null),(0,r._)([(0,u.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],U.prototype,"graphType",void 0),(0,r._)([(0,u.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],U.prototype,"graphTypeName",null),(0,r._)([(0,u.MZ)()],U.prototype,"hasM",null),(0,r._)([(0,u.MZ)()],U.prototype,"hasZ",null),(0,r._)([(0,u.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],U.prototype,"id",void 0),(0,r._)([(0,u.MZ)(J((0,a.o8)(N.kF)))],U.prototype,"labelsVisible",void 0),(0,r._)([(0,u.MZ)({type:[L.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:C.w,write:V()}})],U.prototype,"labelingInfo",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],U.prototype,"layerType",void 0),(0,r._)([(0,u.MZ)(J((0,a.o8)(N.fV)))],U.prototype,"legendEnabled",void 0),(0,r._)([(0,u.MZ)(J((0,a.o8)(N.hG)))],U.prototype,"maxScale",void 0),(0,r._)([(0,u.MZ)(J((0,a.o8)(N.hn)))],U.prototype,"minScale",void 0),(0,r._)([(0,u.MZ)()],U.prototype,"objectIdField",void 0),(0,r._)([(0,u.MZ)()],U.prototype,"objectType",void 0),(0,r._)([(0,u.MZ)(J((0,a.o8)(N.ke)))],U.prototype,"opacity",void 0),(0,r._)([(0,u.MZ)(J((0,a.o8)(A.n)))],U.prototype,"orderBy",void 0),(0,r._)([(0,u.MZ)()],U.prototype,"parentCompositeLayer",void 0),(0,r._)([(0,u.MZ)(J((0,a.o8)(N.M6)))],U.prototype,"popupEnabled",void 0),(0,r._)([(0,u.MZ)({type:s.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],U.prototype,"popupTemplate",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:{overridePolicy:X}}})],U.prototype,"refreshInterval",void 0),(0,r._)([(0,u.MZ)({types:o.H,json:{name:"layerDefinition.drawingInfo.renderer",write:V()}})],U.prototype,"renderer",null),(0,r._)([(0,u.MZ)()],U.prototype,"source",void 0),(0,r._)([(0,u.MZ)()],U.prototype,"spatialReference",null),(0,r._)([(0,u.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],U.prototype,"title",void 0),(0,r._)([(0,d.K)("title")],U.prototype,"writeTitle",null),(0,r._)([(0,u.MZ)({json:{read:!1}})],U.prototype,"type",void 0),(0,r._)([(0,u.MZ)(J((0,a.o8)(S.B)))],U.prototype,"useViewTime",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{name:"visibility",write:V()}})],U.prototype,"visible",void 0),U=(0,r._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],U);const H=U},45654:(e,t,n)=>{n.d(t,{DX:()=>_,_s:()=>b,aq:()=>w,fe:()=>v});var r,s,i,o,a=n(78888),l=n(49186),u=n(91869),p=(n(90708),n(71932)),d=n(42538);n(59456),n(16930),(s=r||(r={})).ELEMENTUID="ELEMENTUID",s.TYPENAME="TYPENAME",r.ELEMENTUID,r.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,f,m,g=n(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 w(e,t){const n=[],r=new Map,s=[];if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&r.set(e.name,[]);for(const t of e)r.has(t.typeName)&&r.get(t.typeName)?.push(t.id);for(const[e,i]of r){if(i.length<1)continue;const r=new d.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}});s.push((0,p.executeQueryStreaming)(t,r).then((async e=>{const t=e.resultRowsStream.getReader();for(;;){const{done:e,value:r}=await t.read();if(e)break;for(const e of r)n.push({id:e[0],typeName:e[1]}),n.push({id:e[2],typeName:e[3]})}})))}return await Promise.all(s),n}async function b(e,t){t??=!1;const n={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e){const t=await(0,a.A)(e,{responseType:"array-buffer"}),n=await t.data;return async function(e){const t=new((await(0,g.I)()).MapOfObjectIdentifierSetsDecoder),n=t.decode(new Uint8Array(e)),r=new Map;if(0!==n.error_code)throw new l.A("knowledge-graph:layer-support-utils",n.error_message);const s=t.get_map_of_identifier_sets(),i=s.keys,o=i.size();for(let e=0;e<o;e++){const t=i.get(e),n=s.query_identifier_set(t),o=[];if(n.id_array_type.value===f.GLOBALID_ARRAY){const e=n.get_globalid_array(),t=e.count();for(let n=0;n<t;n++)o.push(e.get_globalid_at(n))}else{if(n.id_array_type.value!==f.IDENTIFIER_ARRAY)throw new l.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=n.get_identifier_array(),t=e.count();for(let n=0;n<t;n++)o.push(e.get_identifier_at(n).toString())}}r.set(t,o)}return t.delete(),r}(new Uint8Array(n))}(e).then((e=>{!function(e,t){for(const[n,r]of e){const e=(0,u.tE)(t.namedTypeDefinitions,n,(()=>({useAllData:!1,members:new Map})));for(const t of r)e.members.has(t)||e.members.set(t,{id:t})}}(e,n)})),n}async function v(e){const t=await(0,g.I)(),n=new t.MapOfObjectIdentifierSets;!function(e,t,n){for(const[r,s]of n.namedTypeDefinitions){if(!s.members||s.useAllData)continue;const n=s.members.keys(),i=new t.GlobalIdArray,o=new t.ObjectIdentifierSet;for(const e of n)i.add_globalid(e);o.set_globalid_array(i),i.delete(),e.put_identifier_set(r,o),o.delete()}}(n,t,e);const r=new t.MapOfObjectIdentifierSetsEncoder;try{r.set_map_of_identifier_sets(n),r.encode();const e=r.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 r.delete(),t}finally{n.delete()}}n(35448),(m=h||(h={}))[m.featureResult=0]="featureResult",m[m.countResult=1]="countResult",m[m.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"}(f||(f={}))},32756:(e,t,n)=>{n.d(t,{f:()=>u,n:()=>l});var r=n(90237),s=n(93637),i=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),a=n(91880);const l={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:function(e,t,n){if(!e)return null;const r=e.find((e=>!!e.field));if(!r)return null;const s=new a.A;return s.read(r,n),[s]}},write:{writer:function(e,t,n,r){const i=e.find((e=>!!e.field));i&&(0,s.sM)(n,[i.toJSON()],t)}}}},u=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,r._)([(0,i.MZ)(l)],t.prototype,"orderBy",void 0),t=(0,r._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},54310:(e,t,n)=>{n.d(t,{J:()=>w});var r=n(90237),s=(n(44208),n(53966)),i=n(74887),o=n(10107),a=n(79901),l=(n(87811),n(40608)),u=n(89317),p=n(5503),d=(n(60999),n(49186),n(14012),n(80559));const h=new p.A,c=new WeakMap;function y(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&h.push(new WeakRef(e))}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let m=0,g=0;function _(){const e=Date.now();let t=!1;for(const n of h){const r=n.deref();r?r.refreshInterval&&e-(c.get(r)??0)+5>=6e4*r.refreshInterval&&(c.set(r,e),r.refresh(e)):t=!0}if(t)for(let e=h.length-1;e>=0;e--)h.at(e).deref()||h.removeAt(e)}(0,d.fm)((()=>{const e=Date.now();let t=0;for(const n of h){const r=n.deref();r&&(t=f(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?c.get(r)||c.set(r,e):c.delete(r))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(_,g)}}));const w=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,i.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||y(this)}),(()=>{}))}destroy(){!function(e){const t=h.find((t=>t.deref()===e));t&&h.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,i.QZ)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){}};return(0,r._)([(0,o.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.K}}}}})],t.prototype,"refreshInterval",void 0),(0,r._)([(0,a.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,r._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,r._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,r._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}},20437:(e,t,n)=>{n.d(t,{A:()=>m});var r,s=n(90237),i=n(66552),o=n(25482),a=n(10107),l=n(56507),u=(n(87811),n(44208),n(93223)),p=n(36005),d=n(40608),h=n(72088),c=n(98453);const y=new i.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=r=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?y.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,s._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,s._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,s._)([(0,a.MZ)()],f.prototype,"description",void 0),(0,s._)([(0,p.w)("description")],f.prototype,"readDescription",null),(0,s._)([(0,a.MZ)({types:h.gK,json:{read:{reader:h.rS},write:!0}})],f.prototype,"domain",void 0),(0,s._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,s._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,s._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,s._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,s._)([(0,u.e)(c.m)],f.prototype,"type",void 0),(0,s._)([(0,a.MZ)()],f.prototype,"valueType",void 0),(0,s._)([(0,p.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,s._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=r=(0,s._)([(0,d.$)("esri.layers.support.Field")],f);const m=f},91880:(e,t,n)=>{n.d(t,{A:()=>d});var r,s=n(90237),i=n(66552),o=n(25482),a=n(10107),l=(n(44208),n(53966),n(87811),n(40608));const u=new i.J({asc:"ascending",desc:"descending"});let p=r=class extends o.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new r({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,s._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,s._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=r=(0,s._)([(0,l.$)("esri.layers.support.OrderByInfo")],p);const d=p},72088:(e,t,n)=>{n.d(t,{rS:()=>x,gK:()=>I}),n(44208);var r,s=n(90237),i=n(4718),o=n(10107),a=(n(53966),n(93223)),l=n(40608),u=n(25482);n(87811);let p=r=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,s._)([(0,o.MZ)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=r=(0,s._)([(0,l.$)("esri.layers.support.CodedValue")],p);const d=new(n(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let h=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,s._)([(0,a.e)(d)],h.prototype,"type",void 0),h=(0,s._)([(0,l.$)("esri.layers.support.Domain")],h);const c=h;var y;let f=y=class extends c{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,i.o8)(this.codedValues),name:this.name})}};(0,s._)([(0,o.MZ)({type:[p],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,s._)([(0,a.e)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=y=(0,s._)([(0,l.$)("esri.layers.support.CodedValueDomain")],f);const m=f;var g;n(49186);let _=g=class extends c{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,s._)([(0,a.e)({inherited:"inherited"})],_.prototype,"type",void 0),_=g=(0,s._)([(0,l.$)("esri.layers.support.InheritedDomain")],_);const w=_;var b;let v=b=class extends c{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new b({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,s._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],v.prototype,"maxValue",void 0),(0,s._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],v.prototype,"minValue",void 0),(0,s._)([(0,a.e)({range:"range"})],v.prototype,"type",void 0),v=b=(0,s._)([(0,l.$)("esri.layers.support.RangeDomain")],v);const M=v,I={key:"type",base:c,typeMap:{range:v,"coded-value":m,inherited:w}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return M.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},32730:(e,t,n)=>{n.d(t,{BI:()=>m,D3:()=>y,XJ:()=>f,lc:()=>c,mX:()=>_,rU:()=>g,tH:()=>I});var r=n(799);const s="__begin__",i="__end__",o=new RegExp(s,"ig"),a=new RegExp(i,"ig"),l=new RegExp("^"+s,"i"),u=new RegExp(i+"$","i"),p='"',d=p+" + ",h=" + "+p;function c(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function y(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=c(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return _(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return I(t.expression)}return null}function _(e){let t;return e?(t=(0,r.HC)(e,(e=>s+'$feature["'+e+'"]'+i)),t=l.test(t)?t.replace(l,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(o,d).replaceAll(a,h)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,M=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function I(e){if(!e)return null;let t=b.exec(e)||v.exec(e);return t?t[1]||t[3]:(t=M.exec(e),t?t[2]:null)}},92300:(e,t,n)=>{n.d(t,{V:()=>i,X:()=>s});var r=n(65864);function s(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function i(e,t,n){const s=(0,r.xD)(t);return e.map((e=>{const t=s.fromJSON(e);return t.spatialReference=n,t}))}},25927:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(90237),s=(n(59456),n(10107)),i=(n(44208),n(53966),n(87811),n(40608)),o=n(54238),a=n(86738);let l=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,r._)([(0,s.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,r._)([(0,i.$)("esri.rest.knowledgeGraph.Entity")],l);const u=l},54238:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(90237),s=n(10107),i=(n(44208),n(53966),n(87811),n(40608)),o=n(77901);let a=class extends o.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,r._)([(0,s.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,r._)([(0,s.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,r._)([(0,i.$)("esri.rest.knowledgeGraph.GraphNamedObject")],a);const l=a},77901:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(90237),s=n(25482),i=n(10107),o=(n(44208),n(53966),n(87811),n(40608));let a=class extends s.oY{constructor(e){super(e),this.properties=null}};(0,r._)([(0,i.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,r._)([(0,o.$)("esri.rest.knowledgeGraph.GraphObject")],a);const l=a},42538:(e,t,n)=>{n.d(t,{A:()=>p});var r=n(90237),s=n(10107),i=(n(44208),n(53966),n(87811),n(40608)),o=n(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,r._)([(0,s.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,r._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQuery")],a);const l=a;let u=class extends l{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,r._)([(0,s.MZ)()],u.prototype,"bindParameters",void 0),(0,r._)([(0,s.MZ)()],u.prototype,"bindGeometryQuantizationParameters",void 0),(0,r._)([(0,s.MZ)()],u.prototype,"outputQuantizationParameters",void 0),(0,r._)([(0,s.MZ)()],u.prototype,"outputSpatialReference",void 0),(0,r._)([(0,s.MZ)()],u.prototype,"provenanceBehavior",void 0),u=(0,r._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],u);const p=u},40662:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(90237),s=(n(53966),n(44208),n(87811),n(49186),n(40608)),i=n(77901);let o=class extends i.A{constructor(e){super(e)}};o=(0,r._)([(0,s.$)("esri.rest.knowledgeGraph.ObjectValue")],o);const a=o},42095:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(90237),s=n(25482),i=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),a=n(77901);let l=class extends s.oY{constructor(e){super(e),this.path=null}};(0,r._)([(0,i.MZ)({type:[a.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,r._)([(0,o.$)("esri.rest.knowledgeGraph.Path")],l);const u=l},23150:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(90237),s=(n(59456),n(10107)),i=(n(44208),n(53966),n(87811),n(40608)),o=n(54238),a=n(82799);let l=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,r._)([(0,s.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,r._)([(0,s.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,r._)([(0,s.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,r._)([(0,i.$)("esri.rest.knowledgeGraph.Relationship")],l);const u=l},22671:(e,t,n)=>{n.d(t,{A:()=>w});var r,s=n(90237),i=n(59456),o=n(52106),a=n(66552),l=n(25482),u=n(4718),p=n(10107),d=(n(44208),n(53966),n(36005)),h=n(40608),c=n(43937),y=n(16930),f=n(65864),m=n(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=r=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const n=y.A.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const s=e[t],i=o.A.fromJSON(s),a=s.geometry?.spatialReference;null==i.geometry||a||(i.geometry.spatialReference=n);const l=s.aggregateGeometries,u=i.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],s=r?.spatialReference;null==t||s||(t.spatialReference=n)}r.push(i)}return r}writeGeometryType(e,t,n,r){if(e)return void g.write(e,t,n,r);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,n,r)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,r=(0,f.rS)(e);return r&&!n&&t.spatialReference&&(r.spatialReference=y.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let n=0;n<t.features.length;n++){const r=t.features[n];if(r.geometry){const t=e?.[n];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,n],translate:[r,s]}=e,i=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((s-e)/n)));for(let e=0,t=i.length;e<t;e++)o?.(i[e].geometry)||(i.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[r,s],scale:[i,o]}=n;let a=null,l=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;a=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;l=n=>null==n?n:n*t+e}const u=this._getHydrationFunction(e,(e=>e*i+r),(e=>s-e*o),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,n){let r,s;const i=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=n(a[1]);e===r&&o===s||(i.push([e-r,o-s]),r=e,s=o)}else r=t(a[0]),s=n(a[1]),i.push([r,s])}return i.length>0?i:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,f.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,i=r.length;e<i;e++){const i=r[e],o=this._quantizePoints(i,t,n);o&&s.push(o)}return s.length>0?((0,f.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,n);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,r,s){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const i=(0,f.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,r=i.length;e<r;e++){const r=i[e];for(let e=0,s=r.length;e<s;e++){const s=r[e];e>0?(o+=s[0],a+=s[1]):(o=s[0],a=s[1]),s[0]=t(o),s[1]=n(a)}}if(r&&s)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2]),n[3]=s(n[3])}}else if(r)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}else if(s)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=s(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const i=e.points;let o,a;for(let e=0,r=i.length;e<r;e++){const r=i[e];e>0?(o+=r[0],a+=r[1]):(o=r[0],a=r[1]),r[0]=t(o),r[1]=n(a)}if(r&&s)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=r(t[2]),t[3]=s(t[3])}else if(r)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=r(t[2])}else if(s)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,p.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,s._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,p.MZ)({type:[o.A],json:{write:!0}})],_.prototype,"features",void 0),(0,s._)([(0,d.w)("features")],_.prototype,"readFeatures",null),(0,s._)([(0,p.MZ)({type:[m.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,s._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,s._)([(0,c.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,s._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,s._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,s._)([(0,p.MZ)({types:i.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,s._)([(0,d.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,s._)([(0,p.MZ)({type:y.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,s._)([(0,c.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,s._)([(0,p.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=r=(0,s._)([(0,h.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const w=_},2272:(e,t,n)=>{n.d(t,{Dl:()=>o,jV:()=>i,lF:()=>a}),n(92602),n(70333);var r=n(4718),s=n(84952);function i(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,s.An)(e):(0,r.o8)(e)}function a(e,t,n){const r={};for(const s in e){if("declaredClass"===s)continue;const i=e[s];if(null!=i&&"function"!=typeof i)if(Array.isArray(i))r[s]=i.map((e=>a(e)));else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(n?.[s]);r[s]=t?e:JSON.stringify(e)}else r[s]=t?i:JSON.stringify(i);else r[s]=i}return r}n(926)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9519],{49519:(e,t,a)=>{a.r(t),a.d(t,{default:()=>F});var i,n=a(90237),s=(a(59456),a(5503)),o=a(49186),r=a(53966),l=a(91869),h=a(74887),d=a(10107),u=(a(44208),a(87811),a(40608)),c=a(4146),y=a(90708),p=a(92722);!function(e){e.MULTIPLIER="multiplier",e.ABSOLUTE="absoluteValue"}(i||(i={}));var g=a(61184),f=a(70643),m=a(45654),C=a(63074),L=a(25036),M=a(2741);let k,w=null;function b(){return k||(k=a.e(3666).then(a.bind(a,3666)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,M.s)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){w=e}(e)})),k)}var E,T,A,D,x,N,v,R,_,I,P,G;function Z(e,t,a,i,n,s){const o=a.length,r=n.length,l=Float64Array.BYTES_PER_ELEMENT,h=Uint32Array.BYTES_PER_ELEMENT,d=Uint8Array.BYTES_PER_ELEMENT,u=16+o*(d+2*l)+r*(2*h),c=w._malloc(u);try{const d=c+16-c%16,u=d+o*l,y=u+o*l,p=y+r*h,g=p+r*h,f=()=>[w.HEAPF64.subarray(d>>3,(d>>3)+o),w.HEAPF64.subarray(u>>3,(u>>3)+o),w.HEAPU32.subarray(y>>2,(y>>2)+r),w.HEAPU32.subarray(p>>2,(p>>2)+r),w.HEAPU8.subarray(g,g+o)],[m,C,L,M,k]=f();m.set(a),C.set(i),L.set(n),M.set(s),k.set(t);let b=e(o,g,d,u,r,y,p),E=null,T=null;if(b){const e=w.getLayoutLinksTypes(),t=w.getLayoutLinksVerticesEndIndices(),a=w.getLayoutLinksVertices(),i=w.countLayoutLinksVertices();!r||e&&t?i&&!a?b=!1:(E={types:new Uint8Array(w.HEAPU8.subarray(e,e+r)),vertexEndIndex:new Uint32Array(w.HEAPU32.subarray(t>>2,(t>>2)+r)),vertices:new Float64Array(w.HEAPF64.subarray(a>>3,(a>>3)+2*i))},T=w.getAuxiliaryGraphicElements()):b=!1}const[A,D,x,N,v]=f();return a.set(A),i.set(D),n.set(x),s.set(N),t.set(v),{success:b,links:E,graphics:T}}finally{w._free(c),w.cleanupLayout()}}(A=E||(E={}))[A.None=0]="None",A[A.IsMovable=1]="IsMovable",A[A.IsGeographic=2]="IsGeographic",A[A.IsRoot=4]="IsRoot",function(e){e[e.Regular=0]="Regular",e[e.Orthogonal=1]="Orthogonal",e[e.Curved=2]="Curved",e[e.Recursive=3]="Recursive"}(T||(T={})),function(e){e.getMinIdealEdgeLength=function(){return w.getMinIdealEdgeLength()},e.apply=function(e,t,a,i,n,s=2,o=1,r=-1){return Z(((e,t,a,i,n,l,h)=>w.applyForceDirectedLayout(e,t,a,i,n,l,h,s,o,r)),e,t,a,i,n)}}(D||(D={})),function(e){e.apply=function(e,t,a,i,n,s=2,o=1,r=-1){return Z(((e,t,a,i,n,l,h)=>w.applyCommunityLayout(e,t,a,i,n,l,h,s,o,r)),e,t,a,i,n)}}(x||(x={})),function(e){e.apply=function(e,t,a,i,n){return Z(w.applySimpleLayout,e,t,a,i,n)}}(N||(N={})),function(e){e.apply=function(e,t,a,i,n){return Z(w.applyHierarchicalLayout,e,t,a,i,n)}}(v||(v={})),function(e){e.apply=function(e,t,a,i,n){return Z(w.applyRadialTreeLayout,e,t,a,i,n)}}(R||(R={})),function(e){e.apply=function(e,t,a,i,n){return Z(w.applySmartTreeLayout,e,t,a,i,n)}}(_||(_={})),function(e){e.apply=function(e,t,a,i,n,s,o,r,l){return Z(((e,t,a,s,o,h,d)=>{if(i.length!==e)return!1;if(n.length!==e)return!1;if(r.length!==o)return!1;if(l.length!==o)return!1;const u=Float64Array.BYTES_PER_ELEMENT,c=16,y=w._malloc(c+e*u),p=w._malloc(c+e*u),g=w._malloc(c+o*u),f=w._malloc(c+o*u),m=y+c-y%c,C=p+c-p%c,L=g+c-g%c,M=f+c-f%c;try{return w.HEAPF64.subarray(m>>3,(m>>3)+e).set(i),w.HEAPF64.subarray(C>>3,(C>>3)+e).set(n),w.HEAPF64.subarray(L>>3,(L>>3)+o).set(r),w.HEAPF64.subarray(M>>3,(M>>3)+o).set(l),w.applyChronologicalLayout(e,t,a,s,m,C,o,h,d,L,M)}finally{w._free(y),w._free(p),w._free(g),w._free(f)}}),e,t,a,s,o)}}(I||(I={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(P||(P={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(G||(G={}));var S=a(71932),U=a(5443),B=a(86738),O=a(82799);let H=class extends((0,C.dM)((0,L.j)(c.A))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this.defaultLinkChartConfig=null,this._currentLinkChartConfig={layoutMode:"RADIAL_TREE"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new s.A,this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new U.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.sublayerIdsCache=new Map,this.tables=new s.A,this.type="link-chart",this._originalInclusionList=e.inclusionModeDefinition,e.dataPreloadedInLocalCache&&!e.inclusionModeDefinition)throw new o.A("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it")}normalizeCtorArgs(e){return{url:e.url,title:e.title,dataPreloadedInLocalCache:e.dataPreloadedInLocalCache,defaultLinkChartConfig:e.defaultLinkChartConfig}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let a=[],i=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new o.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.inclusionModeDefinition?.generateAllSublayers?(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((n,s)=>{const o=this._graphTypeLookup.get(s);if(!o)return r.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);"relationship"===o.type?t.has(s)||(t.add(s),i.push(o)):"entity"===o.type?t.has(s)||(t.add(s),a.push(o)):(r.A.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(s))})):(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]);const n=new g.PB({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=a,this.memberRelationshipTypes=i,this.dataManager=n}load(e){return this.addResolvingPromise(new Promise((t=>{(0,S.fetchKnowledgeGraph)(this.url).then((a=>{if(this._initializeLayerProperties({knowledgeGraph:a,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache)this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1,e.members?.forEach((e=>{let t;t=e.linkChartLocation instanceof p.A?e.linkChartLocation:e.linkChartLocation?(0,y.Ux)(e.linkChartLocation):null,t&&2===t.coords.length&&0===t.lengths.length?this.entityLinkChartDiagramLookup.set(e.id,t):this.relationshipLinkChartDiagramLookup.set(e.id,t)})),this.addResolvingPromise(this._initializeDiagram().then((async()=>{this.layers.forEach((async e=>{await e.refreshCachedQueryEngine()})),this.tables.forEach((async e=>{await e.refreshCachedQueryEngine()}))})))}));else{const t="GEOGRAPHIC"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{(0,h.Te)(e);const t=[],a=[];this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1,this.dataManager.inclusionModeDefinition.namedTypeDefinitions.forEach((e=>{e.useAllData=!1}))),await this._initializeDiagram(),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine()),t.push(new Promise((t=>{e.on("layerview-create",(()=>{t(null)}))})))})),this.tables.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),await Promise.all(a)})))}t(null)}))}))),Promise.resolve(this)}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await(0,m.aq)(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));await this._handleNewRecords(i)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1}){let i=[];for(const t of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id)&&i.push(t);if(t){const e=new Set,t=[];for(const t of i)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(const a of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(a);for(const a of e)if(this.dataManager.memberIdTypeLookup.has(a))for(const e of this.dataManager.memberIdTypeLookup.get(a))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:a,typeName:e});i=i.concat(t)}this.dataManager.removeFromLayer(i);for(const e of i)this.sublayerIdsCache.get(e.typeName)?.delete(e.id),this.dataManager.relationshipTypeNames.has(e.typeName)?this.relationshipLinkChartDiagramLookup.delete(e.id):this.entityLinkChartDiagramLookup.delete(e.id);a&&await this.calculateLinkChartLayout(this._currentLinkChartConfig.layoutMode,this._currentLinkChartConfig.layoutOptions);const n=[];return this.layers.forEach((e=>{n.push(e.refreshCachedQueryEngine())})),await Promise.all(n),this._refreshNamedTypes(),i}async expand(e,t){const a=await this.dataManager.getConnectedRecordIds(e,t),i=a.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));return await this._handleNewRecords(a),{records:i}}loadLayerAssumingLocalCache(){this.memberRelationshipTypes.forEach((e=>{const t=new f.A({objectType:e,parentCompositeLayer:this,graphType:"relationship",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.memberEntityTypes.forEach((e=>{const t=new f.A({objectType:e,parentCompositeLayer:this,graphType:"entity",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{const a=(0,l.tE)(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((e=>{if(a.add(e.id),e.linkChartLocation)if(e.linkChartLocation instanceof p.A)this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e.id,e.linkChartLocation):this.entityLinkChartDiagramLookup.set(e.id,e.linkChartLocation);else{const a=(0,y.Ux)(e.linkChartLocation);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e.id,e.linkChartLocation?a:null):this.entityLinkChartDiagramLookup.set(e.id,e.linkChartLocation?a:null)}}))}))}async calculateLinkChartLayout(e="RADIAL_TREE",t){const a=[],i=[],n=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{a.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{i.push({typeName:t,feature:e})}))})),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const s=new Map,l=new Map,h=new Map,d=new Map,u=new Uint8Array(a.length),c=new Float64Array(a.length),p=new Float64Array(a.length),f=new Uint32Array(i.length),m=new Uint32Array(i.length),C=[],L=new U.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let M,k="FORCE_DIRECTED",w=0,A=0;switch(k="GEOGRAPHIC"===e?"FORCE_DIRECTED":e,k){case"FORCE_DIRECTED":M=D.apply;break;case"COMMUNITY":M=x.apply;break;case"HIERARCHICAL":M=v.apply;break;case"RADIAL_TREE":M=R.apply;break;case"SMART_TREE":M=_.apply;break;default:M=N.apply}a.forEach((({typeName:a,feature:i})=>{if(t?.lockedNodeLocations?.has(i.attributes[g.yC])){"GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(a)?u[w]=E.IsGeographic:u[w]=E.None;const n=t.lockedNodeLocations.get(i.attributes[g.yC]);c[w]=n.x,p[w]=n.y}else if("GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(a)){u[w]=E.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],n=this.dataManager.geographicLookup.get(a)?.geometryType;switch(n){case"esriGeometryPoint":c[w]=t?.x,p[w]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(c[w]=e.x,p[w]=e.y):u[w]=E.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(c[w]=e.x,p[w]=e.y):u[w]=E.IsMovable;break;default:u[w]=E.IsMovable}(null==c[w]||null==p[w]||Number.isNaN(c[w])||Number.isNaN(p[w]))&&(u[w]=E.IsMovable,c[w]=0,p[w]=0)}else u[w]=E.IsMovable,c[w]=0,p[w]=0;d.set(i.attributes[g.yC],w),C[w]={feature:i,typeName:a},w++}));let I=!1;const P=new Map;i.forEach((e=>{const t=e.feature.attributes[g.Vr],a=e.feature.attributes[g.ZL],i=d.get(t),s=d.get(a);if(void 0!==i&&void 0!==s){const o=t+"-"+a,r=P.get(o),l=r?.has(e.typeName);l||(f[A]=i,m[A]=s,void 0===r?P.set(o,new Map([[e.typeName,A]])):r.set(e.typeName,A),A++),n.push(e)}else I=!0,this.relationshipLinkChartDiagramLookup.set(t,null)})),I&&r.A.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const G=this._validateLayoutSettings(e,t),Z=this._convertLayoutSettingsToCalculationSettings(G);await b();const{success:S,links:H}=M(u,c,p,f.subarray(0,A),m.subarray(0,A),Z.computationBudgetTime,Z.idealEdgeLengthMultiplier,Z.repulsionRadiusMultiplier);if(!S)throw new o.A("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");for(let e=0;e<C.length;e++){if(p[e]>84.9999?p[e]=84.9999:p[e]<-84.9999&&(p[e]=-84.9999),c[e]>179.9999?c[e]=179.9999:c[e]<-179.9999&&(c[e]=-179.9999),C[e].feature.attributes[g.sZ]=new B.A(c[e],p[e]),s.has(C[e].typeName)){const t=s.get(C[e].typeName);t?.set(C[e].feature.attributes[g.yC],C[e].feature)}else{const t=new Map;t.set(C[e].feature.attributes[g.yC],C[e].feature),s.set(C[e].typeName,t)}h.set(C[e].feature.attributes[g.yC],C[e].feature);const t=(0,y.Ux)(C[e].feature.attributes[g.sZ]);this.entityLinkChartDiagramLookup.set(C[e].feature.attributes[g.yC],C[e].feature.attributes[g.sZ]?t:null),C[e].feature.attributes[g.sZ].x<L.xmin&&(L.xmin=C[e].feature.attributes[g.sZ].x),C[e].feature.attributes[g.sZ].x>L.xmax&&(L.xmax=C[e].feature.attributes[g.sZ].x),C[e].feature.attributes[g.sZ].y<L.ymin&&(L.ymin=C[e].feature.attributes[g.sZ].y),C[e].feature.attributes[g.sZ].y>L.ymax&&(L.ymax=C[e].feature.attributes[g.sZ].y)}if(this.linkChartExtent.xmin=L.xmin,this.linkChartExtent.xmax=L.xmax,this.linkChartExtent.ymin=L.ymin,this.linkChartExtent.ymax=L.ymax,!H)throw new o.A("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const F=new Map,z=new Map,V=new Map,j=new Set;for(let e=0;e<n.length;e++){const t=[],a=n[e],i=a.feature.attributes[g.Vr],s=a.feature.attributes[g.ZL],o=i+"-"+s,u=P.get(o).get(a.typeName),c=0===u?0:H?.vertexEndIndex[u-1];if(!j.has(u)){if(j.add(u),H.types[u]===T.Recursive){const e=[H.vertices[2*c],H.vertices[2*c+1]],a=[H.vertices[2*(c+1)],H.vertices[2*(c+1)+1]],i=[.5*(e[0]+a[0]),.5*(e[1]+a[1])],n=[i[0]-e[0],i[1]-e[1]],s=[i[0]+n[1],i[1]-n[0]],o=[i[0]-n[1],i[1]+n[0]];t.push(e),t.push(s),t.push(a),t.push(o),t.push(e)}else{if(H.types[u]!==T.Regular){r.A.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=c;e<H.vertexEndIndex[u];e++)t.push([H.vertices[2*e],H.vertices[2*e+1]])}const e=C[d.get(i)]?.feature.attributes[g.sZ],a=C[d.get(s)]?.feature.attributes[g.sZ];t[0][0]===e.x&&t[0][1]===e.y||(t[0]=[e.x,e.y]),t[t.length-1][0]===a.x&&t[t.length-1][1]===a.y||(t[t.length-1]=[a.x,a.y]);for(let e=1;e<t.length-1;e++)t[e][1]>85.5?t[e][1]=85.5:t[e][1]<-85.5&&(t[e][1]=-85.5),t[e][0]>179.9999?t[e][0]=179.9999:t[e][0]<-179.9999&&(t[e][0]=-179.9999);F.has(o)?F.get(o).push(t):F.set(o,[t])}const p=F.get(o);z.has(o)||(z.set(o,new Map),V.set(o,new Map));const f=z.get(o),m=V.get(o);f.has(a.typeName)||(f.set(a.typeName,p.shift()),m.set(a.typeName,0));const L=f.get(a.typeName);m.set(a.typeName,m.get(a.typeName)+1);const M=new O.A({paths:L});if(a.feature.attributes[g.sZ]=M,l.has(a.typeName)){const e=l.get(a.typeName);e?.set(a.feature.attributes[g.yC],a.feature)}else{const e=new Map;e.set(a.feature.attributes[g.yC],a.feature),l.set(a.typeName,e)}h.set(a.feature.attributes[g.yC],a.feature);const k=(0,y.Ux)(a.feature.attributes[g.sZ]);this.relationshipLinkChartDiagramLookup.set(a.feature.attributes[g.yC],a.feature.attributes[g.sZ]?k:null)}for(const e of n)e.feature.attributes[g.d4]=V.get(e.feature.attributes[g.Vr]+"-"+e.feature.attributes[g.ZL])?.get(e.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutOptions:G},{nodes:s,links:l,idMap:h}}async applyNewLinkChartLayout(e="RADIAL_TREE",t){const a=[];await this.calculateLinkChartLayout(e,t),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;return this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((t=>{t?.members?.forEach((t=>{const a=t.linkChartLocation;let i;const n=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(n,new B.A({x:i.x,y:i.y})))}))})),e}async synchronizeInclusionListWithCache(){return new Promise((e=>{this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{if(e.useAllData=!1,e.members&&e.members.size>0){if(!this.dataManager.sublayerCaches.get(t))return;const a=new Set(Array.from(this.dataManager.sublayerCaches.get(t).keys()));Array.from(e.members.keys()).filter((e=>!a.has(e))).forEach((t=>{e.members?.delete(t)}))}})),e()}))}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e){let t=[];for(const e of this.dataManager.relationshipTypeNames){const a=this.sublayerIdsCache.get(e);a&&(t=t.concat(Array.from(a.keys())))}const a=await this.dataManager.getRelationshipsBetweenNodes(e,t);return await this._handleNewRecords(a),{records:a}}async connectFromEntities(e){let t=[];for(const e of this.dataManager.relationshipTypeNames){const a=this.sublayerIdsCache.get(e);a&&(t=t.concat(Array.from(a.keys())))}let a=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(a=a.concat(Array.from(t)))}const i=await this.dataManager.getRelationshipsFromNodes(e,a,t);return await this._handleNewRecords(i),{records:i}}async _handleNewRecords(e){const t=[];this.dataManager.addToLayer(e);for(const a of e)this.sublayerIdsCache.has(a.typeName)||(this.sublayerIdsCache.set(a.typeName,new Set),t.push(a.typeName)),this.sublayerIdsCache.get(a.typeName).add(a.id);for(const e of t){const t=this._graphTypeLookup.get(e);if(t){const a=new f.A({objectType:t,parentCompositeLayer:this,graphType:t.type,title:e});"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),a.geometryType?this.layers.push(a):this.tables.push(a),this.dataManager.sublayerCaches.set(e,new Map)}}await this.dataManager.refreshCacheContent(e.map((e=>e.id)));const a=Object.assign({},this._currentLinkChartConfig.layoutOptions);a.lockedNodeLocations=new Map;for(const[e,t]of this.entityLinkChartDiagramLookup.entries())t&&a.lockedNodeLocations.set(e,new B.A(t.coords[0],t.coords[1]));console.log("Applying new layout with locked locations: ",a.lockedNodeLocations),await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,a)}async _initializeDiagram(){this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e?.members?.forEach((e=>{const a=e.linkChartLocation;let i;const n=e.id;if(!a)return;i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]};const s=(0,y.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n,s):this.entityLinkChartDiagramLookup.set(n,s),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[g.Vr]),a=this.relationshipLinkChartDiagramLookup.get(e.attributes[g.ZL]);if(t&&a){const i=(0,y.Ux)(new O.A({paths:[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[g.yC],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[g.yC],null)}))}))):await this.calculateLinkChartLayout(this.defaultLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations(),...this.defaultLinkChartConfig.layoutOptions||{}}):await this.calculateLinkChartLayout("RADIAL_TREE",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateLayoutSettings(e,t){const a=e=>"number"==typeof e&&!isNaN(e),n=new Set(["FORCE_DIRECTED","COMMUNITY","GEOGRAPHIC"]),s={};if(!n.has(e)||!t)return!n.has(e)&&t&&r.A.getLogger(this).warn("Layout mode options were given for a layout mode that does not utilize them, settings will be ignored"),s;const{computationBudgetTime:o,repulsionRadiusMultiplier:l,idealEdgeLength:h,idealEdgeLengthType:d}=t;(e=>a(e)&&e>=1)(o)?s.computationBudgetTime=o:void 0!==o&&r.A.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),(e=>a(e)&&e>=1)(l)?s.repulsionRadiusMultiplier=l:void 0!==l&&r.A.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting");const u=void 0!==h||void 0!==d;return"GEOGRAPHIC"!==e&&u?r.A.getLogger(this).warn("Ideal edge length settings were specified for an incompatible layout mode, and will be ignored"):"GEOGRAPHIC"===e&&u&&((e=>Object.values(i).includes(e))(d)?s.idealEdgeLengthType=d:void 0!==d&&r.A.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),(e=>a(e)&&e>=0)(h)?s.idealEdgeLength=h:void 0!==h&&r.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),s}_convertLayoutSettingsToCalculationSettings(e){let t=e.idealEdgeLength;return e.idealEdgeLengthType===i.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.computationBudgetTime,repulsionRadiusMultiplier:e.repulsionRadiusMultiplier,idealEdgeLengthMultiplier:t}}};(0,n._)([(0,d.MZ)()],H.prototype,"dataPreloadedInLocalCache",void 0),(0,n._)([(0,d.MZ)()],H.prototype,"defaultLinkChartConfig",void 0),(0,n._)([(0,d.MZ)()],H.prototype,"dataManager",void 0),(0,n._)([(0,d.MZ)()],H.prototype,"knowledgeGraph",void 0),(0,n._)([(0,d.MZ)()],H.prototype,"layers",void 0),(0,n._)([(0,d.MZ)()],H.prototype,"entityLinkChartDiagramLookup",void 0),(0,n._)([(0,d.MZ)()],H.prototype,"relationshipLinkChartDiagramLookup",void 0),(0,n._)([(0,d.MZ)()],H.prototype,"linkChartExtent",void 0),(0,n._)([(0,d.MZ)()],H.prototype,"memberEntityTypes",void 0),(0,n._)([(0,d.MZ)()],H.prototype,"memberRelationshipTypes",void 0),(0,n._)([(0,d.MZ)()],H.prototype,"sublayerIdsCache",void 0),(0,n._)([(0,d.MZ)()],H.prototype,"tables",void 0),(0,n._)([(0,d.MZ)({json:{read:!1}})],H.prototype,"type",void 0),H=(0,n._)([(0,u.$)("esri.layers.LinkChartLayer")],H);const F=H}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8739,9377,3069],{39516:(e,t,n)=>{async function r(e,t){const{WhereClause:r}=await Promise.all([n.e(835),n.e(4800)]).then(n.bind(n,50835));return r.create(e,t)}function i(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}n.d(t,{G:()=>r,m:()=>i})},3330:(e,t,n)=>{n.d(t,{GB:()=>i,Qo:()=>s,Y4:()=>o});var r=n(96285);class i{}function o(e){return e instanceof r.bo?e===i.instance:"unknown"===e?.toString().toLowerCase()}function s(e){return o(e)?i.instance:e}i.instance=new r.oh("Etc/UTC")},13069:(e,t,n)=>{n.d(t,{lk:()=>i,vD:()=>s,yS:()=>o});const r="randomUUID"in crypto;function i(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}},70328:(e,t,n)=>{n.d(t,{BI:()=>h,Ej:()=>p,Hq:()=>u,Ie:()=>f,Jt:()=>m,Ne:()=>y,RF:()=>l,aI:()=>w,fA:()=>o,hZ:()=>d,iT:()=>a,is:()=>g,qv:()=>_,vI:()=>c,v_:()=>b,vt:()=>i,w1:()=>s});var r=n(5443);function i(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,n,r,o,s,l=i()){return l[0]=e,l[1]=t,l[2]=n,l[3]=r,l[4]=o,l[5]=s,l}function s(e,t){const n=isFinite(e[2])||isFinite(e[5]);return new r.A(n?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,n=0,r=t.length/3){let i=e[0],o=e[1],s=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<r;e++)i=Math.min(i,t[n+3*e]),o=Math.min(o,t[n+3*e+1]),s=Math.min(s,t[n+3*e+2]),l=Math.max(l,t[n+3*e]),a=Math.max(a,t[n+3*e+1]),u=Math.max(u,t[n+3*e+2]);e[0]=i,e[1]=o,e[2]=s,e[3]=l,e[4]=a,e[5]=u}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function y(e,t,n=e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function c(e,t,n=e){return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function f(e){return e?d(e,_):i(_)}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function h(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function w(e,t,n){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(n){for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}n(19419);const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];i()},17136:(e,t,n)=>{n.d(t,{el:()=>v});var r=n(92602),i=n(49186),o=n(53966),s=n(39829),l=n(82799),a=n(80754),u=n(21325),p=n(28735),y=(n(59456),n(78888)),c=n(65864),d=n(2272),f=n(84952),m=n(92300);const h=()=>o.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function _(e,t,n){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h().error(e),new i.A(e)}const n=(0,a.r8)(e),r=[];for(const e of n){const n=[];r.push(n),n.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const i=e[r][0],o=e[r][1],s=e[r+1][0],l=e[r+1][1],a=Math.sqrt((s-i)*(s-i)+(l-o)*(l-o)),u=(l-o)/a,p=(s-i)/a,y=a/t;if(y>1){for(let e=1;e<=y-1;e++){const r=e*t,s=p*r+i,l=u*r+o;n.push([s,l])}const e=(a+Math.floor(y-1)*t)/2,r=p*e+i,s=u*e+o;n.push([r,s])}n.push([s,l])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:r,spatialReference:e.spatialReference}):new l.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return n&&(e=(0,a.kS)(e,n)),e}function b(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,a.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,a.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,a.kd)(r,t);e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=(0,a.kd)(r,n);e=e.clone().offset(t*(-2*n),0)}}return e}function S(e,t){let n=-1;for(let r=0;r<t.cutIndexes.length;r++){const i=t.cutIndexes[r],o=t.geometries[r],s=(0,a.r8)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const r=t[e][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*(0,a.kd)(n,180);for(let n=0;n<t.length;n++){const t=o.getPoint(e,n);o.setPoint(e,n,t.clone().offset(r,0))}return!0}}))}if(i===n){if(g(e))for(const t of(0,a.r8)(o))e[i]=e[i].addRing(t);else if(w(e))for(const t of(0,a.r8)(o))e[i]=e[i].addPath(t)}else n=i,e[i]=o}return e}async function v(e,t,n){if(!Array.isArray(e))return v([e],t);t&&"string"!=typeof t&&h().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let o,g,w,M,x,T,N,O,F=0;const A=[],Z=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,g=(0,u.Vp)(o),w=o.isWebMercator,T=w?102100:4326,M=a.j7[T].maxX,x=a.j7[T].minX,N=a.j7[T].plus180Line,O=a.j7[T].minus180Line),g)if("mesh"===t.type)Z.push(t);else if("point"===t.type)Z.push(b(t.clone(),M,x));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,M,x))),Z.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);Z.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,n=(0,a.kd)(e.xmin,x)*(2*M);let r=0===n?t.clone():(0,a.kS)(t.clone(),n);e.offset(n,0);let{xmin:i,xmax:o}=e;i=Number(i.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(N)&&o!==M?(F=o>F?o:F,r=_(r,w),A.push(r),Z.push("cut")):e.intersects(O)&&i!==x?(F=o*(2*M)>F?o*(2*M):F,r=_(r,w,360),A.push(r),Z.push("cut")):Z.push(r)}else Z.push(t.clone());else Z.push(t);else Z.push(t);let I=(0,a.kd)(F,M),R=-90;const J=I,j=new l.A;for(;I>0;){const e=360*I-180;j.addPath([[e,R],[e,-1*R]]),R*=-1,I--}if(A.length>0&&J>0){const t=S(A,await async function(e,t,n,r){const i=(0,d.Dl)(e),o=t[0].spatialReference,s={...r,responseType:"json",query:{...i.query,f:"json",sr:(0,u.YX)(o),target:JSON.stringify({geometryType:(0,c.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},l=await(0,y.A)(i.path+"/cut",s),{cutIndexes:a,geometries:p=[]}=l.data;return{cutIndexes:a,geometries:p.map((e=>{const t=(0,c.rS)(e);return t.spatialReference=o,t}))}}(i,A,j,n)),r=[],o=[];for(let n=0;n<Z.length;n++){const i=Z[n];if("cut"!==i)o.push(i);else{const i=t.shift(),s=e[n];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&i.rings.length>=s.rings.length?(r.push(i),o.push("simplify")):o.push(w?(0,p.Gh)(i):i)}}if(!r.length)return o;const s=await async function(e,t,n){const r="string"==typeof e?(0,f.An)(e):e,i=t[0].spatialReference,o=(0,c.$B)(t[0]),s={...n,query:{...r.query,f:"json",sr:(0,u.YX)(i),geometries:JSON.stringify((0,m.X)(t))}},{data:l}=await(0,y.A)(r.path+"/simplify",s);return(0,m.V)(l.geometries,o,i)}(i,r,n),l=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?l.push(t):l.push(w?(0,p.Gh)(s.shift()):s.shift())}return l}const L=[];for(let e=0;e<Z.length;e++){const t=Z[e];if("cut"!==t)L.push(t);else{const e=A.shift();L.push(!0===w?(0,p.Gh)(e):e)}}return L}},80754:(e,t,n)=>{n.d(t,{j7:()=>s,kS:()=>a,kd:()=>l,r8:()=>u});var r=n(82799),i=n(16930),o=n(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const n=u(e);for(const e of n)for(const n of e)n[0]+=t;return e}function u(e){return(0,o.Bi)(e)?e.rings:e.paths}},35079:(e,t,n)=>{n.r(t),n.d(t,{default:()=>H});var r=n(90237),i=(n(59456),n(52106)),o=(n(61147),n(5503)),s=n(49186),l=n(4718),a=n(92071),u=n(93637),p=n(67076),y=n(10107),c=(n(44208),n(53966),n(36005)),d=n(40608),f=n(43937),m=n(57251),h=n(19419),g=n(17136),w=n(21325),_=n(13600),b=(n(87811),n(62885));let S=class extends o.A{constructor(e){super(e),this.addHandles([this.on("before-add",(e=>{null==e.item&&e.preventDefault()})),this.on("after-add",(e=>this._own(e.item))),this.on("after-remove",(e=>this._release(e.item)))])}get owner(){return this._get("owner")}set owner(e){e!==this._get("owner")&&(this._releaseAll(),this._set("owner",e),this._ownAll())}_ownAll(){for(const e of this.items)this._own(e)}_releaseAll(){for(const e of this.items)this._release(e)}_createNewInstance(e){return this.itemType?new(o.A.ofType(this.itemType.Type))(e):new o.A(e)}};(0,r._)([(0,y.MZ)()],S.prototype,"owner",null),S=(0,r._)([(0,d.$)("esri.core.support.OwningCollection")],S);var v=n(4146),M=n(63074),x=n(25036),T=n(56507),N=n(7695);let O=class extends S{_own(e){e.layer&&"remove"in e.layer&&e.layer!==this.owner&&e.layer.remove(e),e.layer=this.owner}_release(e){e.layer===this.owner&&(e.layer=null)}};(0,r._)([(0,N.u)({Type:i.A,ensureType:(0,T.dp)(i.A)})],O.prototype,"itemType",void 0),O=(0,r._)([(0,d.$)("esri.support.GraphicsCollection")],O);var F=n(88625);let A=class extends((0,M.dM)((0,x.j)(v.A))){constructor(e){super(e),this.elevationInfo=null,this.graphics=new O,this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}on(e,t){return super.on(e,t)}graphicChanged(e){this.emit("graphic-update",e)}};var Z,I;(0,r._)([(0,y.MZ)({type:F.A})],A.prototype,"elevationInfo",void 0),(0,r._)([(0,y.MZ)((Z=O,I="graphics",{type:Z,cast:b.H,set(e){const t=(0,b.V)(e,this._get(I),Z);t.owner=this,this._set(I,t)}}))],A.prototype,"graphics",void 0),(0,r._)([(0,y.MZ)({type:["show","hide"]})],A.prototype,"listMode",void 0),(0,r._)([(0,y.MZ)()],A.prototype,"screenSizePerspectiveEnabled",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],A.prototype,"type",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"internal",void 0),A=(0,r._)([(0,d.$)("esri.layers.GraphicsLayer")],A);const R=A;var J=n(33032),j=n(16131),L=n(8303),D=n(20437),C=n(94985),E=n(31593),G=n(53930),$=n(68249),V=n(16930),P=n(5443);function z(e){return"markup"===e.featureCollectionType||e.layers.some((e=>null!=e.layerDefinition.visibilityField||!B(e)))}function B({layerDefinition:e,featureSet:t}){const n=e.geometryType??t.geometryType;return Y.find((t=>n===t.geometryTypeJSON&&e.drawingInfo?.renderer?.symbol?.type===t.identifyingSymbol.type))}function q(){return new P.A({xmin:-180,ymin:-90,xmax:180,ymax:90})}const k=new D.A({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),X=new D.A({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0,length:255});let U=class extends R{constructor(e){super(e),this.visibilityMode="inherited"}initialize(){for(const e of this.graphics)e.sourceLayer=this.layer;this.graphics.on("after-add",(e=>{e.item.sourceLayer=this.layer})),this.graphics.on("after-remove",(e=>{e.item.sourceLayer=null}))}get fullExtent(){const e=this.layer?.spatialReference,t=this.fullBounds;return e?null==t?(0,m.projectOrLoad)(q(),e).geometry:(0,h.w1)(t,e):null}get fullBounds(){const e=this.layer?.spatialReference;if(!e)return null;const t=(0,h.Ie)();return this.graphics.forEach((n=>{const r=null!=n.geometry?(0,m.projectOrLoad)(n.geometry,e).geometry:null;null!=r&&(0,h.fT)(t,"point"===r.type?r:r.extent,t)})),(0,h.aI)(t,h.qv)?null:t}get sublayers(){return this.graphics}};(0,r._)([(0,y.MZ)({readOnly:!0})],U.prototype,"fullExtent",null),(0,r._)([(0,y.MZ)({readOnly:!0})],U.prototype,"fullBounds",null),(0,r._)([(0,y.MZ)({readOnly:!0})],U.prototype,"sublayers",null),(0,r._)([(0,y.MZ)()],U.prototype,"layer",void 0),(0,r._)([(0,y.MZ)()],U.prototype,"layerId",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],U.prototype,"visibilityMode",void 0),U=(0,r._)([(0,d.$)("esri.layers.MapNotesLayer.MapNotesSublayer")],U);const Y=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:(new C.A).toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:(new E.A).toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:(new G.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:(new G.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:(new $.A).toJSON()}];let W=class extends((0,M.dM)((0,x.j)((0,j.q)((0,L.A)((0,a.P)(v.A)))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=V.A.WGS84,this.sublayers=new o.A(Y.map((e=>new U({id:e.id,layerId:e.layerId,title:e.title,layer:this})))),this.title="Map Notes",this.type="map-notes",this.visibilityMode="inherited"}readCapabilities(e,t,n){return{operations:{supportsMapNotesEditing:!z(t)&&"portal-item"!==n?.origin}}}readFeatureCollections(e,t,n){if(!z(t))return null;const r=t.layers.map((e=>{const t=new _.default;return t.read(e,n),t}));return new o.A({items:r})}readLegacyfeatureCollectionJSON(e,t){return z(t)?(0,l.o8)(t.featureCollection):null}get fullExtent(){const e=this.spatialReference,t=(0,h.Ie)();return null!=this.sublayers?this.sublayers.forEach((({fullBounds:e})=>null!=e?(0,h.fT)(t,e,t):t),t):this.featureCollectionJSON?.layers.some((e=>e.layerDefinition.extent))&&this.featureCollectionJSON.layers.forEach((n=>{const r=(0,m.projectOrLoad)(n.layerDefinition.extent,e).geometry;null!=r&&(0,h.fT)(t,r,t)})),(0,h.aI)(t,h.qv)?(0,m.projectOrLoad)(q(),e).geometry:(0,h.w1)(t,e)}readMinScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.minScale)return e.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.maxScale)return e.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?V.A.fromJSON(t.layers[0].layerDefinition.spatialReference):V.A.WGS84}readSublayers(e,t,n){if(z(t))return null;const r=[];let s=t.layers.reduce(((e,t)=>Math.max(e,t.layerDefinition.id??-1)),-1)+1;for(const e of t.layers){const{layerDefinition:t,featureSet:n}=e,o=t.id??s++,l=B(e);if(null!=l){const e=new U({id:l.id,title:t.name,layerId:o,layer:this,graphics:n.features.map((({geometry:e,symbol:t,attributes:n,popupInfo:r})=>i.A.fromJSON({attributes:n,geometry:e,symbol:t,popupTemplate:r})))});r.push(e)}}return new o.A(r)}writeSublayers(e,t,n,r){const{minScale:i,maxScale:o}=this;if(null==e)return;const l=e.some((e=>e.graphics.length>0));if(!this.capabilities.operations.supportsMapNotesEditing)return void(l&&r?.messages?.push(new s.A("map-notes-layer:editing-not-supported","New map notes cannot be added to this layer")));const a=[];let p=this.spatialReference.toJSON();e:for(const t of e)for(const e of t.graphics)if(null!=e.geometry){p=e.geometry.spatialReference.toJSON();break e}for(const t of Y){const n=e.find((e=>t.id===e.id));this._writeMapNoteSublayer(a,n,t,i,o,p,r)}(0,u.sM)("featureCollection.layers",a,t)}get textLayer(){return this._findSublayer("textLayer")}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}read(e,t){"featureCollection"in e&&(e=(0,l.o8)(e),Object.assign(e,e.featureCollection)),super.read(e,t)}async beforeSave(){if(null==this.sublayers)return;let e=null;const t=[];for(const n of this.sublayers)for(const r of n.graphics)if(null!=r.geometry){const n=r.geometry;e?(0,w.aI)(n.spatialReference,e)||((0,m.canProjectWithoutEngine)(n.spatialReference,e)||(0,m.isLoaded)()||await(0,m.load)(),r.geometry=(0,m.project)(n,e)):e=n.spatialReference,t.push(r)}const n=await(0,g.el)(t.map((e=>e.geometry)));t.forEach(((e,t)=>e.geometry=n[t]))}_findSublayer(e){return null==this.sublayers?null:this.sublayers?.find((t=>t.id===e))??null}_writeMapNoteSublayer(e,t,n,r,i,o,s){const a=[];if(null!=t){for(const e of t.graphics)this._writeMapNote(a,e,n.geometryType,s);this._normalizeObjectIds(a,k),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:(0,l.o8)(n.identifyingSymbol)}},id:t.layerId,geometryType:n.geometryTypeJSON,minScale:r,maxScale:i,objectIdField:"OBJECTID",fields:[k.toJSON(),X.toJSON()],spatialReference:o},featureSet:{features:a,geometryType:n.geometryTypeJSON}})}}_writeMapNote(e,t,n,r){if(null==t)return;const{geometry:i,symbol:o,popupTemplate:s}=t;if(null==i)return;if(i.type!==n)return void r?.messages?.push(new p.A("map-notes-layer:invalid-geometry-type",`Geometry "${i.type}" cannot be saved in "${n}" layer`,{graphic:t}));if(null==o)return void r?.messages?.push(new p.A("map-notes-layer:no-symbol","Skipping map notes with no symbol",{graphic:t}));const l={attributes:{...t.attributes},geometry:i.toJSON(),symbol:o.toJSON()};null!=s&&(l.popupInfo=s.toJSON()),e.push(l)}_normalizeObjectIds(e,t){const n=t.name;let r=(0,J.H)(n,e)+1;const i=new Set;for(const t of e){t.attributes||(t.attributes={});const{attributes:e}=t;(null==e[n]||i.has(e[n]))&&(e[n]=r++),i.add(e[n])}}};(0,r._)([(0,y.MZ)({readOnly:!0})],W.prototype,"capabilities",void 0),(0,r._)([(0,c.w)(["portal-item","web-map"],"capabilities",["layers"])],W.prototype,"readCapabilities",null),(0,r._)([(0,y.MZ)({readOnly:!0})],W.prototype,"featureCollections",void 0),(0,r._)([(0,c.w)(["web-map","portal-item"],"featureCollections",["layers"])],W.prototype,"readFeatureCollections",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],W.prototype,"featureCollectionJSON",void 0),(0,r._)([(0,c.w)(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],W.prototype,"readLegacyfeatureCollectionJSON",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],W.prototype,"featureCollectionType",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],W.prototype,"fullExtent",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{target:"featureCollection.showLegend",overridePolicy(){return{enabled:null!=this.featureCollectionJSON}}}}}}})],W.prototype,"legendEnabled",void 0),(0,r._)([(0,y.MZ)({type:["show","hide","hide-children"]})],W.prototype,"listMode",void 0),(0,r._)([(0,y.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],W.prototype,"minScale",void 0),(0,r._)([(0,c.w)(["web-map","portal-item"],"minScale",["layers"])],W.prototype,"readMinScale",null),(0,r._)([(0,y.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],W.prototype,"maxScale",void 0),(0,r._)([(0,c.w)(["web-map","portal-item"],"maxScale",["layers"])],W.prototype,"readMaxScale",null),(0,r._)([(0,y.MZ)({readOnly:!0})],W.prototype,"multipointLayer",null),(0,r._)([(0,y.MZ)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],W.prototype,"operationalLayerType",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],W.prototype,"pointLayer",null),(0,r._)([(0,y.MZ)({readOnly:!0})],W.prototype,"polygonLayer",null),(0,r._)([(0,y.MZ)({readOnly:!0})],W.prototype,"polylineLayer",null),(0,r._)([(0,y.MZ)({type:V.A})],W.prototype,"spatialReference",void 0),(0,r._)([(0,c.w)(["web-map","portal-item"],"spatialReference",["layers"])],W.prototype,"readSpatialReference",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],W.prototype,"sublayers",void 0),(0,r._)([(0,c.w)("web-map","sublayers",["layers"])],W.prototype,"readSublayers",null),(0,r._)([(0,f.K)("web-map","sublayers")],W.prototype,"writeSublayers",null),(0,r._)([(0,y.MZ)({readOnly:!0})],W.prototype,"textLayer",null),(0,r._)([(0,y.MZ)()],W.prototype,"title",void 0),(0,r._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],W.prototype,"type",void 0),W=(0,r._)([(0,d.$)("esri.layers.MapNotesLayer")],W);const H=W},33032:(e,t,n)=>{n.d(t,{H:()=>i,L:()=>r});const r=1;function i(e,t){let n=0;for(const r of t){const t=r.attributes?.[e];"number"==typeof t&&isFinite(t)&&(n=Math.max(n,t))}return n}},33143:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(90237),i=n(69540),o=n(25482),s=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),a=n(40608),u=n(43937),p=n(72088),y=n(29005);let c=class extends((0,i.O)(o.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const n of Object.keys(e))t[n]=(0,p.rS)(e[n]);return t}writeDomains(e,t){const n={};for(const t of Object.keys(e))e[t]&&(n[t]=e[t]?.toJSON());t.domains=n}};(0,r._)([(0,s.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,r._)([(0,s.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,r._)([(0,s.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,r._)([(0,l.w)("domains")],c.prototype,"readDomains",null),(0,r._)([(0,u.K)("domains")],c.prototype,"writeDomains",null),(0,r._)([(0,s.MZ)({type:[y.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,r._)([(0,a.$)("esri.layers.support.FeatureType")],c);const d=c},20437:(e,t,n)=>{n.d(t,{A:()=>h});var r,i=n(90237),o=n(66552),s=n(25482),l=n(10107),a=n(56507),u=(n(87811),n(44208),n(93223)),p=n(36005),y=n(40608),c=n(72088),d=n(98453);const f=new o.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=r=class extends s.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?f.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,i._)([(0,l.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,i._)([(0,l.MZ)()],m.prototype,"description",void 0),(0,i._)([(0,p.w)("description")],m.prototype,"readDescription",null),(0,i._)([(0,l.MZ)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],m.prototype,"domain",void 0),(0,i._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,i._)([(0,l.MZ)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,i._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,i._)([(0,u.e)(d.m)],m.prototype,"type",void 0),(0,i._)([(0,l.MZ)()],m.prototype,"valueType",void 0),(0,i._)([(0,p.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,i._)([(0,l.MZ)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=r=(0,i._)([(0,y.$)("esri.layers.support.Field")],m);const h=m},95466:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(49186),i=n(25482),o=n(53966),s=n(91869),l=n(3330),a=n(30524),u=n(56400),p=n(96285);const y=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],h(e))}static fromLayerJSON(e){return new c(e.fields??[],h(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const n=[];for(const e of this.fields){const t=e?.name,r=f(t);if(t&&r){const i=d(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(r,e),n.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}n.sort(),this.uid=n.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(d(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(o.A.getLogger("esri.layers.support.FieldsIndex").error(new r.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?l.GB.instance:t===u.n$?p.mQ.utcInstance:(0,s.tE)(y,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,i.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function d(e){return e.trim().toLowerCase()}function f(e){return(0,a.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function h(e){const t=new Map;if(!e.fields)return t;const n=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:i}=e,o=(r?"startField"in r?r.startField:r.startTimeField:"")??"",s=(r?"endField"in r?r.endField:r.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,a=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.dateFieldsTimeReference?(0,u.ZS)(i.dateFieldsTimeReference):l??u.n$:null,p=r?function(e){return"timeZone"in e}(r)?r.timeZone??l:r.timeReference?(0,u.ZS)(r.timeReference):l:null,y=new Map([[d(i?.creationDateField??""),a],[d(i?.editDateField??""),a],[d(o),p],[d(s),p]]);for(const{name:r,type:i}of e.fields)if(m.has(i))t.set(r,u.L5);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(r,null);else if(n)t.set(r,u.L5);else{const e=y.get(d(r??""))??l;t.set(r,e)}return t}},72088:(e,t,n)=>{n.d(t,{rS:()=>x,gK:()=>M}),n(44208);var r,i=n(90237),o=n(4718),s=n(10107),l=(n(53966),n(93223)),a=n(40608),u=n(25482);n(87811);let p=r=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,s.MZ)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=r=(0,i._)([(0,a.$)("esri.layers.support.CodedValue")],p);const y=new(n(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,l.e)(y)],c.prototype,"type",void 0),c=(0,i._)([(0,a.$)("esri.layers.support.Domain")],c);const d=c;var f;let m=f=class extends d{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,o.o8)(this.codedValues),name:this.name})}};(0,i._)([(0,s.MZ)({type:[p],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,i._)([(0,l.e)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=f=(0,i._)([(0,a.$)("esri.layers.support.CodedValueDomain")],m);const h=m;var g;n(49186);let w=g=class extends d{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,i._)([(0,l.e)({inherited:"inherited"})],w.prototype,"type",void 0),w=g=(0,i._)([(0,a.$)("esri.layers.support.InheritedDomain")],w);const _=w;var b;let S=b=class extends d{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new b({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i._)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],S.prototype,"maxValue",void 0),(0,i._)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],S.prototype,"minValue",void 0),(0,i._)([(0,l.e)({range:"range"})],S.prototype,"type",void 0),S=b=(0,i._)([(0,a.$)("esri.layers.support.RangeDomain")],S);const v=S,M={key:"type",base:d,typeMap:{range:S,"coded-value":h,inherited:_}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return v.fromJSON(e);case"codedValue":return h.fromJSON(e);case"inherited":return _.fromJSON(e)}return null}},98453:(e,t,n)=>{n.d(t,{m:()=>r});const r=new(n(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"})},32730:(e,t,n)=>{n.d(t,{BI:()=>h,D3:()=>f,XJ:()=>m,lc:()=>d,mX:()=>w,rU:()=>g,tH:()=>M});var r=n(799);const i="__begin__",o="__end__",s=new RegExp(i,"ig"),l=new RegExp(o,"ig"),a=new RegExp("^"+i,"i"),u=new RegExp(o+"$","i"),p='"',y=p+" + ",c=" + "+p;function d(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function f(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=d(e.labelExpression),t.type="conventional"),t}function h(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return w(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(_);return t?.[1].trim()||null}(t.expression);case"arcade":return M(t.expression)}return null}function w(e){let t;return e?(t=(0,r.HC)(e,(e=>i+'$feature["'+e+'"]'+o)),t=a.test(t)?t.replace(a,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(s,y).replaceAll(l,c)):t='""',t}const _=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,S=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function M(e){if(!e)return null;let t=b.exec(e)||S.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}},92300:(e,t,n)=>{n.d(t,{V:()=>o,X:()=>i});var r=n(65864);function i(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function o(e,t,n){const i=(0,r.xD)(t);return e.map((e=>{const t=i.fromJSON(e);return t.spatialReference=n,t}))}},58501:(e,t,n)=>{n.d(t,{q:()=>i});var r=n(62815);function i(e,t,n){if(!n?.features||!n.hasZ)return;const i=(0,r.N)(n.geometryType,t,e.outSpatialReference);if(null!=i)for(const e of n.features)i(e.geometry)}},22671:(e,t,n)=>{n.d(t,{A:()=>_});var r,i=n(90237),o=n(59456),s=n(52106),l=n(66552),a=n(25482),u=n(4718),p=n(10107),y=(n(44208),n(53966),n(36005)),c=n(40608),d=n(43937),f=n(16930),m=n(65864),h=n(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=r=class extends a.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const n=f.A.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const i=e[t],o=s.A.fromJSON(i),l=i.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=n);const a=i.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],i=r?.spatialReference;null==t||i||(t.spatialReference=n)}r.push(o)}return r}writeGeometryType(e,t,n,r){if(e)return void g.write(e,t,n,r);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,n,r)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,r=(0,m.rS)(e);return r&&!n&&t.spatialReference&&(r.spatialReference=f.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let n=0;n<t.features.length;n++){const r=t.features[n];if(r.geometry){const t=e?.[n];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,n],translate:[r,i]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((i-e)/n)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[r,i],scale:[o,s]}=n;let l=null,a=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;l=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;a=n=>null==n?n:n*t+e}const u=this._getHydrationFunction(e,(e=>e*o+r),(e=>i-e*s),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,n){let r,i;const o=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=n(l[1]);e===r&&s===i||(o.push([e-r,s-i]),r=e,i=s)}else r=t(l[0]),i=n(l[1]),o.push([r,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,m.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=r.length;e<o;e++){const o=r[e],s=this._quantizePoints(o,t,n);s&&i.push(s)}return i.length>0?((0,m.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,n);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,r,i){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,m.Bi)(e)?e.rings:e.paths;let s,l;for(let e=0,r=o.length;e<r;e++){const r=o[e];for(let e=0,i=r.length;e<i;e++){const i=r[e];e>0?(s+=i[0],l+=i[1]):(s=i[0],l=i[1]),i[0]=t(s),i[1]=n(l)}}if(r&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2]),n[3]=i(n[3])}}else if(r)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=i(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,l;for(let e=0,r=o.length;e<r;e++){const r=o[e];e>0?(s+=r[0],l+=r[1]):(s=r[0],l=r[1]),r[0]=t(s),r[1]=n(l)}if(r&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=r(t[2]),t[3]=i(t[3])}else if(r)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=r(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,p.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,p.MZ)({type:[s.A],json:{write:!0}})],w.prototype,"features",void 0),(0,i._)([(0,y.w)("features")],w.prototype,"readFeatures",null),(0,i._)([(0,p.MZ)({type:[h.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,i._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,i._)([(0,d.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,i._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,i._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,i._)([(0,p.MZ)({types:o.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,i._)([(0,y.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,i._)([(0,p.MZ)({type:f.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,i._)([(0,d.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,i._)([(0,p.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=r=(0,i._)([(0,c.$)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const _=w},2272:(e,t,n)=>{n.d(t,{Dl:()=>s,jV:()=>o,lF:()=>l}),n(92602),n(70333);var r=n(4718),i=n(84952);function o(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function s(e){return"string"==typeof e?(0,i.An)(e):(0,r.o8)(e)}function l(e,t,n){const r={};for(const i in e){if("declaredClass"===i)continue;const o=e[i];if(null!=o&&"function"!=typeof o)if(Array.isArray(o))r[i]=o.map((e=>l(e)));else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(n?.[i]);r[i]=t?e:JSON.stringify(e)}else r[i]=t?o:JSON.stringify(o);else r[i]=o}return r}n(926)}}]);
|