@arcgis/core 4.31.0-next.20240820 → 4.31.0-next.20240821
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{dc03a639c97a6f99dbc9.js → 1ac47b7a77818c372e1a.js} +1 -1
- package/assets/esri/core/workers/chunks/{a2c40517266fe420017c.js → 25fa59544c13db8cee30.js} +1 -1
- package/assets/esri/core/workers/chunks/40e4224f700206c67053.js +1 -0
- package/assets/esri/core/workers/chunks/5c4173205f885cd21422.js +1 -0
- package/assets/esri/core/workers/chunks/5cb07fa227b7fd06499f.js +1 -0
- package/assets/esri/core/workers/chunks/{44bb9ca79b7eeb605b32.js → 7fda3d3b211b6da5b0e5.js} +1 -1
- package/assets/esri/core/workers/chunks/949cbb667531527e6918.js +1 -0
- package/assets/esri/core/workers/chunks/9bbf7129579fe04ab268.js +1 -0
- package/assets/esri/core/workers/chunks/{1bd48c11947082f8b296.js → cd8d595d577b74817623.js} +1 -1
- package/assets/esri/core/workers/chunks/{c27f0a9b14f82feb9792.js → cfc93bbd35cc4bfde7c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{07737567079db2a208b3.js → e2a6f77c05d0818e3f74.js} +1 -1
- package/assets/esri/core/workers/chunks/{1ee365125c9fb9d9cafe.js → e5474bcde5b8fa037b56.js} +11 -11
- package/assets/esri/core/workers/chunks/{bd9c85047ef82c5a8bef.js → ea561b2460e634a643fc.js} +1 -1
- package/chunks/BloomComposition.glsl.js +45 -0
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +1 -1
- package/chunks/OperatorProximity.js +5 -0
- package/chunks/Polyline.js +1 -1
- package/core/mathUtils.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +1 -1
- package/geometry/operators/gx/operatorCut.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorSimplify.js +1 -1
- package/geometry/operators/gx/operatorUnion.js +1 -1
- package/geometry/operators/operatorProximity.js +5 -0
- package/geometry/operators/operatorRelate.js +1 -1
- package/geometry/operators/operatorReshape.js +5 -0
- package/layers/LinkChartLayer.js +1 -1
- package/layers/graphics/sources/geojson/geojson.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/knowledgeGraph/SessionMemoryStorage.js +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/package.json +1 -1
- package/portal/PortalItem.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +3 -3
- package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +5 -0
- package/views/3d/webgl-engine/effects/bloom/BloomTechnique.js +5 -0
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/assets/esri/core/workers/chunks/2b61de00084c1ca97da6.js +0 -1
- package/assets/esri/core/workers/chunks/31f931de94414f13bd13.js +0 -1
- package/assets/esri/core/workers/chunks/6f1853ab502bebefd3c3.js +0 -1
- package/assets/esri/core/workers/chunks/9661398ce832137461f6.js +0 -1
- package/assets/esri/core/workers/chunks/cd737bfb5ff43737a3df.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4923],{55359:(t,e,s)=>{s.d(e,{q:()=>n});var i=s(57219);class n{constructor(t,e){this._storage=new i.F,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,s=1){this._storage.put(this,t,e,s,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},57219:(t,e,s)=>{s.d(e,{F:()=>a,Mn:()=>o});var i,n,r=s(3694);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(t,e,s){this.name=t,this._storage=e,this.id=u+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(t){return this._storage.getSize(this,t)}resetHitRate(){this._hit=this._miss=0}put(t,e,s,i=0){this._storage.put(this,t,e,s,i)}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}peek(t){return this._storage.peek(this,t)}updateSize(t,e,s){this._storage.updateSize(this,t,e,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.A,this._users=new r.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}getSize(t,e){const s=this._db.get(t.id+e);return s?.size??0}put(t,e,s,n,r){e=t.id+e;const o=this._db.get(e);if(o&&(this._size-=o.size,t.size-=o.size,this._db.delete(e),o.entry!==s&&this._notifyRemove(e,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(e,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${e}`),void this._notifyRemove(e,s,0,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(e,new l(s,n,a)),this._size+=n,t.size+=n,this._checkSize()}updateSize(t,e,s,n){e=t.id+e;const r=this._db.get(e);if(r&&r.entry===s){for(this._size-=r.size,t.size-=r.size;n>this._maxSize;){const t=this._notifyRemove(e,s,n,i.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);n=t}r.size=n,this._size+=n,t.size+=n,this._checkSize()}}pop(t,e){e=t.id+e;const s=this._db.get(e);if(s)return this._size-=s.size,t.size-=s.size,this._db.delete(e),++this._hit,s.entry;++this._miss}get(t,e){e=t.id+e;const s=this._db.get(e);if(void 0!==s)return this._db.delete(e),s.lives=s.lifetime,this._db.set(e,s),++this._hit,s.entry;++this._miss}peek(t,e){const s=this._db.get(t.id+e);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},s=new Array;this._db.forEach(((t,i)=>{const n=t.lifetime;s[n]=(s[n]||0)+t.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=e[r]||0;e[r]=s+t.size}}))}));const i={};this._users.forAll((t=>{const s=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const n=e[s]||0;e[s]=n,i[s]=Math.round(100*t.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(e);n.sort(((t,s)=>e[s]-e[t])),n.forEach((s=>t[s]=Math.round(e[s]/2**20)+"MB / "+i[s]));for(let e=s.length-1;e>=0;--e){const i=s[e];i&&(t["Priority "+(e+-3-1)]=Math.round(i/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,t.size,i.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,t.size,i.ALL))),this._users.forAll((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,s,i){let n;return this._removeFuncs.some((r=>{if(t.startsWith(r[0])){const t=r[1](e,i,s);return"number"==typeof t&&(n=t),!0}return!1})),n}_checkSize(){this._users.forAll((t=>this._checkSizeLimits(t))),this._checkSizeLimits()}_checkSizeLimits(t){const e=t??this;if(e.maxSize<0||e.size<=e.maxSize)return;const s=t?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,t),e.size<=.9*e.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,t),e.size<=.9*e.maxSize))return}_purgeItem(t,e,s=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,s&&(s.size-=e.size);const n=this._notifyRemove(t,e.entry,e.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),e.lives=e.lifetime,e.size=n,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let u=0;class l{constructor(t,e,s){this.entry=t,this.size=e,this.lifetime=s,this.lives=s}}},67482:(t,e,s)=>{function i(t){return null!=a(t)||null!=o(t)}function n(t){return u.test(t)}function r(t){return a(t)??o(t)}function o(t){const e=new Date(t);return function(t,e){if(Number.isNaN(t.getTime()))return!1;let s=!0;if(h&&/\d+\W*$/.test(e)){const t=e.match(/[a-zA-Z]{2,}/);if(t){let e=!1,i=0;for(;!e&&i<=t.length;)e=!l.test(t[i]),i++;s=!e}}return s}(e,t)?Number.isNaN(e.getTime())?null:e.getTime()-6e4*e.getTimezoneOffset():null}function a(t){const e=u.exec(t);if(!e?.groups)return null;const s=e.groups,i=+s.year,n=+s.month-1,r=+s.day,o=+(s.hours??"0"),a=+(s.minutes??"0"),l=+(s.seconds??"0");if(o>23)return null;if(a>59)return null;if(l>59)return null;const h=s.ms??"0",d=h?+h.padEnd(3,"0").slice(0,3):0;let c;if(s.isUTC||!s.offsetSign)c=Date.UTC(i,n,r,o,a,l,d);else{const t=+s.offsetHours,e=+s.offsetMinutes;c=6e4*("+"===s.offsetSign?-1:1)*(60*t+e)+Date.UTC(i,n,r,o,a,l,d)}return Number.isNaN(c)?null:c}s.d(e,{Br:()=>n,Cq:()=>i,_U:()=>r});const u=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,h=!Number.isNaN(new Date("technology 10").getTime())},75503:(t,e,s)=>{s.d(e,{E:()=>w,w:()=>o});var i=s(4576),n=(s(44208),s(3694)),r=s(11006);class o{constructor(t=9,e){this._compareMinX=d,this._compareMinY=c,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),S.prune(),b.prune(),I.prune(),F.prune()}all(t){a(this._data,t)}search(t,e){let s=this._data;const i=this._toBBox;if(g(t,s))for(S.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;g(t,o)&&(s.leaf?e(r):_(t,o)?a(r,e):S.push(r))}s=S.pop()}}collides(t){let e=this._data;const s=this._toBBox;if(!g(t,e))return!1;for(S.clear();e;){for(let i=0,n=e.children.length;i<n;i++){const n=e.children[i],r=e.leaf?s(n):n;if(g(t,r)){if(e.leaf||_(t,r))return!0;S.push(n)}}e=S.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,s=t.length;e<s;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new B([]),this}remove(t){if(!t)return this;let e,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(t);for(I.clear(),F.clear();s||I.length>0;){if(s||(s=I.pop(),n=I.data[I.length-1],r=F.pop()??0,o=!0),s.leaf&&(e=(0,i.qh)(s.children,t,s.children.length,s.indexHint),-1!==e))return s.children.splice(e,1),I.push(s),this._condense(I),this;o||s.leaf||!_(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(I.push(s),F.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,s,i){const n=s-e+1;let r=this._maxEntries;if(n<=r){const i=new B(t.slice(e,s+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new M([]);o.height=i;const a=Math.ceil(n/r),l=a*Math.ceil(Math.sqrt(r));x(t,e,s,l,this._compareMinX);for(let n=e;n<=s;n+=l){const e=Math.min(n+l-1,s);x(t,n,e,a,this._compareMinY);for(let s=n;s<=e;s+=a){const n=Math.min(s+a-1,e);o.children.push(this._build(t,s,n,i-1))}}return u(o,this._toBBox),o}_insert(t,e,s){const i=this._toBBox,n=s?t:i(t);I.clear();const r=function(t,e,s,i){for(;i.push(e),!0!==e.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=p(o),u=m(t,o)-a;u<n?(n=u,i=a<i?a:i,s=o):u===n&&a<i&&(i=a,s=o)}e=s||e.children[0]}return e}(n,this._data,e,I);for(r.children.push(t),h(r,n);e>=0&&I.data[e].children.length>this._maxEntries;)this._split(I,e),e--;!function(t,e,s){for(let i=s;i>=0;i--)h(e.data[i],t)}(n,I,e)}_split(t,e){const s=t.data[e],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return;const o=s.children.splice(r,s.children.length-r),a=s.leaf?new B(o):new M(o);a.height=s.height,u(s,this._toBBox),u(a,this._toBBox),e?t.data[e-1].children.push(a):this._splitRoot(s,a)}_splitRoot(t,e){this._data=new M([t,e]),this._data.height=t.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(t,e,s){let i,n,r;i=n=1/0;for(let o=e;o<=s-e;o++){const e=l(t,0,o,this._toBBox),a=l(t,o,s,this._toBBox),u=y(e,a),h=p(e)+p(a);u<i?(i=u,r=o,n=h<n?h:n):u===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(t,e,s){const i=t.leaf?this._compareMinX:d,n=t.leaf?this._compareMinY:c;this._allDistMargin(t,e,s,i)<this._allDistMargin(t,e,s,n)&&t.children.sort(i)}_allDistMargin(t,e,s,i){t.children.sort(i);const n=this._toBBox,r=l(t,0,e,n),o=l(t,s-e,s,n);let a=f(r)+f(o);for(let i=e;i<s-e;i++){const e=t.children[i];h(r,t.leaf?n(e):e),a+=f(r)}for(let i=s-e-1;i>=e;i--){const e=t.children[i];h(o,t.leaf?n(e):e),a+=f(o)}return a}_condense(t){for(let e=t.length-1;e>=0;e--){const s=t.data[e];if(0===s.children.length)if(e>0){const n=t.data[e-1],r=n.children;r.splice((0,i.qh)(r,s,r.length,n.indexHint),1)}else this.clear();else u(s,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){let s=t;for(b.clear();s;){if(!0===s.leaf)for(const t of s.children)e(t);else b.pushArray(s.children);s=b.pop()??null}}function u(t,e){l(t,0,t.children.length,e,t)}function l(t,e,s,i,n){n||(n=new B([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=e;o<s;o++)r=t.children[o],h(n,t.leaf?i(r):r);return n}function h(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function d(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function p(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function y(t,e){const s=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),n=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function _(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function x(t,e,s,i,n){const o=[e,s];for(;o.length;){const e=o.pop(),s=o.pop();if(e-s<=i)continue;const a=s+Math.ceil((e-s)/i/2)*i;(0,r.q)(t,a,s,e,n),o.push(s,a,a,e)}}const S=new n.A,b=new n.A,I=new n.A,F=new n.A({deallocator:void 0});class w{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class v extends w{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class B extends v{constructor(t){super(),this.children=t,this.leaf=!0}}class M extends v{constructor(t){super(),this.children=t,this.leaf=!1}}},36708:(t,e,s)=>{s.d(e,{C_:()=>c,OH:()=>m,Vh:()=>y,on:()=>d,pc:()=>_,wB:()=>u,z7:()=>l}),s(60999),s(5503);var i=s(37955),n=s(36563),r=s(97768),o=s(74887),a=s(14012);function u(t,e,s={}){return h(t,e,s,p)}function l(t,e,s={}){return h(t,e,s,f)}function h(t,e,s={},i){let n=null;const o=s.once?(t,s)=>{i(t)&&((0,r.xt)(n),e(t,s))}:(t,s)=>{i(t)&&e(t,s)};if(n=(0,a.Cn)(t,o,s.sync,s.equals),s.initial){const e=t();o(e,e)}return n}function d(t,e,s,o={}){let a=null,l=null,h=null;function d(){a&&l&&(l.remove(),o.onListenerRemove?.(a),a=null,l=null)}function c(t){o.once&&o.once&&(0,r.xt)(h),s(t)}const p=u(t,((t,s)=>{d(),(0,i.wb)(t)&&(a=t,l=(0,i.on)(t,e,c),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return h=(0,n.hA)((()=>{p.remove(),d()})),h}function c(t,e){return function(t,e,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=t();if(e?.(i))return Promise.resolve(i);let a=null;function u(){a=(0,r.xt)(a)}return new Promise(((i,r)=>{a=(0,n.vE)([(0,o.u7)(s,(()=>{u(),r((0,o.NK)())})),h(t,(t=>{u(),i(t)}),{sync:!1,once:!0},e??p)])}))}(t,f,e)}function p(t){return!0}function f(t){return!!t}s(80559);const m={sync:!0},y={initial:!0},_={sync:!0,initial:!0}},6518:(t,e,s)=>{s.d(e,{F:()=>a});var i=s(44208),n=s(75503),r=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,i.A)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((s,i)=>{t[e++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.Ie)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,s){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,s)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(t,e,s)=>{s.d(e,{A:()=>f});var i=s(4576),n=s(49186),r=s(65529),o=s(53966),a=s(70328),u=s(19419),l=s(90708),h=s(6518),d=s(51441),c=s(37730);const p=(0,a.vt)();class f{constructor(t){this.geometryInfo=t,this._boundsStore=new h.F,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.A,this.featureAdapter=c.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach((e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;const[e,s,i,n]=this.fullBounds;return{xmin:e,ymin:s,xmax:i,ymax:n,spatialReference:(0,d.ag)(t)}}add(t){this._add(t),this._emitChanged()}addMany(t){for(const e of t)this._add(e);this._emitChanged()}upsertMany(t){const e=t.map((t=>this._upsert(t)));return this._emitChanged(),e.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(t){const e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(const e of t){const t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(const s of t){const t=this._boundsStore.get(s.objectId);t&&e((0,a.Jt)(p,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach((e=>t(e)))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,(t=>{e(this._featuresById.get(t))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let t=!1;this._featuresById.forEach(((e,s)=>{this._markedIds.has(s)||(t=!0,this._remove(e))})),this._markedIds.clear(),t&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;const e=t.objectId;if(null==e)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:t}));const s=this._featuresById.get(e);let i;if(this._markedIds.add(e),s?(t.displayId=s.displayId,i=this._boundsStore.get(e),this._boundsStore.delete(e)):null!=this.onFeatureAdd&&this.onFeatureAdd(t),!t.geometry?.coords?.length)return this._boundsStore.set(e,null),void this._featuresById.set(e,t);i=(0,l.jQ)(null!=i?i:(0,u.vt)(),t.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(e,i),this._featuresById.set(e,t)}_upsert(t){const e=t?.objectId;if(null==e)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:t})),null;const s=this._featuresById.get(e);if(!s)return this._add(t),t;this._markedIds.add(e);const{geometry:i,attributes:r}=t;for(const t in r)s.attributes[t]=r[t];return i&&(s.geometry=i,this._boundsStore.set(e,(0,l.jQ)((0,u.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);const e=t.objectId;return this._markedIds.delete(e),this._boundsStore.delete(e),this._featuresById.delete(e),t}}},37730:(t,e,s)=>{s.d(e,{T:()=>o});var i=s(27647),n=s(43334),r=s(92722);const o={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e)=>new n.Om(e,t.attributes,null,t.objectId),getGeometry:t=>t.geometry,getCentroid:(t,e)=>(null==t.centroid&&(t.centroid=(0,i.Q)(new r.A,t.geometry,e.hasZ,e.hasM)),t.centroid)}},71202:(t,e,s)=>{s.r(e),s.d(e,{default:()=>I});var i=s(78888),n=s(60999),r=s(49186),o=s(53966),a=s(74887),u=s(65864),l=s(21325),h=s(90708),d=s(83221),c=s(31464),p=s(17970),f=s(85113),m=s(64714),y=s(82832),_=s(95466),g=s(98453),x=s(30524),S=s(56400);const b={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!1,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};class I{constructor(){this._queryEngine=null,this._snapshotFeatures=async t=>{const e=await this._fetch(t);return this._createFeatures(e)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(t,e={}){this._loadOptions={url:t.url,customParameters:t.customParameters};const s=[],[i]=await Promise.all([t.url?this._fetch(e?.signal):null,this._checkProjection(t.spatialReference)]),n=(0,f.BM)(i,{geometryType:t.geometryType}),o=t.fields||n.fields||[],a=null!=t.hasZ?t.hasZ:n.hasZ,u=n.geometryType;let h=t.objectIdField||n.objectIdFieldName||"__OBJECTID";const c=t.spatialReference||l.KK;let y=t.timeInfo;o===n.fields&&n.unknownFields.length>0&&s.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:n.unknownFields}});const I=new _.A(o);let F=I.get(h);F?("esriFieldTypeString"!==F.type&&(F.type="esriFieldTypeOID"),F.editable=!1,F.nullable=!1,h=F.name):(F={alias:h,name:h,type:"string"===n.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(F));const w={};for(const t of o){if(null==t.name&&(t.name=t.alias),null==t.alias&&(t.alias=t.name),!t.name)throw new r.A("geojson-layer:invalid-field-name","field name is missing",{field:t});if(!g.m.jsonValues.includes(t.type))throw new r.A("geojson-layer:invalid-field-type",`invalid type for field "${t.name}"`,{field:t});if(t.name!==F.name){const e=(0,x.lD)(t);void 0!==e&&(w[t.name]=e)}null==t.length&&(t.length=(0,x._b)(t))}if(y){if(y.startTimeField){const t=I.get(y.startTimeField);t?(y.startTimeField=t.name,t.type="esriFieldTypeDate"):y.startTimeField=null}if(y.endTimeField){const t=I.get(y.endTimeField);t?(y.endTimeField=t.name,t.type="esriFieldTypeDate"):y.endTimeField=null}if(y.trackIdField){const t=I.get(y.trackIdField);t?y.trackIdField=t.name:(y.trackIdField=null,s.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:y}}))}y.startTimeField||y.endTimeField||(s.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:y}}),y=null)}const v=u?(0,m.F0)(u):void 0,B=I.dateFields.length?{timeZoneIANA:S.n$}:null,M={warnings:s,featureErrors:[],layerDefinition:{...b,drawingInfo:v??void 0,templates:(0,m.e2)(w),extent:void 0,geometryType:u,objectIdField:h,fields:o,hasZ:!!a,timeInfo:y,dateFieldsTimeReference:B}};this._queryEngine=new p.d({fieldsIndex:_.A.fromLayerJSON({fields:o,timeInfo:y,dateFieldsTimeReference:B}),geometryType:u,hasM:!1,hasZ:a,objectIdField:h,spatialReference:c,timeInfo:y,featureStore:new d.A({geometryType:u,hasM:!1,hasZ:a}),cacheSpatialQueries:!0});const z=this._queryEngine.fieldsIndex.requiredFields.indexOf(F);z>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(z,1),this._createDefaultAttributes=(0,m.Vx)(w,h);const E=await this._createFeatures(i);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,E);const A=this._normalizeFeatures(E,M.featureErrors);this._queryEngine.featureStore.addMany(A);const{fullExtent:T,timeExtent:R}=await this._queryEngine.fetchRecomputedExtents();if(M.layerDefinition.extent=T,R){const{start:t,end:e}=R;M.layerDefinition.timeInfo.timeExtent=[t,e]}return M}async applyEdits(t){const{spatialReference:e,geometryType:s}=this._queryEngine;return await Promise.all([(0,y.$1)(e,s),(0,c.Nk)(t.adds,e),(0,c.Nk)(t.updates,e)]),await this._waitSnapshotComplete(),this._applyEdits(t)}async queryFeatures(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(t,e.signal)}async queryFeatureCount(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(t,e.signal)}async queryObjectIds(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(t,e.signal)}async queryExtent(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(t,e.signal)}async querySnapping(t,e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(t,e.signal)}async refresh(t){this._loadOptions.customParameters=t,this._snapshotTask?.abort(),this._snapshotTask=(0,n.UT)(this._snapshotFeatures),this._snapshotTask.promise.then((t=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,t);const e=this._normalizeFeatures(t);e&&this._queryEngine.featureStore.addMany(e)}),(t=>{this._queryEngine.featureStore.clear(),(0,a.zf)(t)||o.A.getLogger("esri.layers.GeoJSONLayer").error(new r.A("geojson-layer:refresh","An error occurred during refresh",{error:t}))})),await this._waitSnapshotComplete();const{fullExtent:e,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:e,timeExtent:s}}async _createFeatures(t){if(null==t)return[];const{geometryType:e,hasZ:s,objectIdField:i}=this._queryEngine,n=(0,f.bd)(t,{geometryType:e,hasZ:s,objectIdField:i});if(!(0,l.aI)(this._queryEngine.spatialReference,l.KK))for(const t of n)null!=t.geometry&&(t.geometry=(0,h.Ux)((0,c.Cv)((0,h.zv)(t.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),l.KK,this._queryEngine.spatialReference)));return n}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:e,customParameters:s}=this._loadOptions,n=(await(0,i.A)(e??"",{responseType:"json",query:{...s},signal:t})).data;return(0,f.sO)(n),n}_normalizeFeatures(t,e){const{objectIdField:s,fieldsIndex:i}=this._queryEngine,n=[];for(const r of t){const t=this._createDefaultAttributes(),o=(0,y.MB)(i,t,r.attributes,!0);o?e?.push(o):(this._assignObjectId(t,r.attributes,!0),r.attributes=t,r.objectId=t[s],n.push(r))}return n}async _applyEdits(t){const{adds:e,updates:s,deletes:i}=t,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(e?.length&&this._applyAddEdits(n,e),s?.length&&this._applyUpdateEdits(n,s),i?.length){for(const t of i)n.deleteResults.push((0,y.bP)(t));this._queryEngine.featureStore.removeManyById(i)}const{fullExtent:r,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:r,timeExtent:o,featureEditResults:n}}_applyAddEdits(t,e){const{addResults:s}=t,{geometryType:i,hasM:n,hasZ:r,objectIdField:o,spatialReference:a,featureStore:l,fieldsIndex:d}=this._queryEngine,p=[];for(const n of e){if(n.geometry&&i!==(0,u.$B)(n.geometry)){s.push((0,y.Yx)("Incorrect geometry type."));continue}const e=this._createDefaultAttributes(),r=(0,y.MB)(d,e,n.attributes);if(r)s.push(r);else{if(this._assignObjectId(e,n.attributes),n.attributes=e,null!=n.uid){const e=n.attributes[o];t.uidToObjectId[n.uid]=e}if(null!=n.geometry){const t=n.geometry.spatialReference??a;n.geometry=(0,c.Cv)((0,y.CR)(n.geometry,t),t,a)}p.push(n),s.push((0,y.bP)(n.attributes[o]))}}l.addMany((0,h.Di)([],p,i,r,n,o))}_applyUpdateEdits({updateResults:t},e){const{geometryType:s,hasM:i,hasZ:n,objectIdField:r,spatialReference:o,featureStore:a,fieldsIndex:l}=this._queryEngine;for(const d of e){const{attributes:e,geometry:p}=d,f=e?.[r];if(null==f){t.push((0,y.Yx)(`Identifier field ${r} missing`));continue}if(!a.has(f)){t.push((0,y.Yx)(`Feature with object id ${f} missing`));continue}const m=(0,h.oN)(a.getFeature(f),s,n,i);if(null!=p){if(s!==(0,u.$B)(p)){t.push((0,y.Yx)("Incorrect geometry type."));continue}const e=p.spatialReference??o;m.geometry=(0,c.Cv)((0,y.CR)(p,e),e,o)}if(e){const s=(0,y.MB)(l,m.attributes,e);if(s){t.push(s);continue}}a.add((0,h.E2)(m,s,n,i,r)),t.push((0,y.bP)(f))}}_createObjectIdGenerator(t,e){const s=t.fieldsIndex.get(t.objectIdField);if("esriFieldTypeString"===s.type)return()=>s.name+"-"+Date.now().toString(16);let i=Number.NEGATIVE_INFINITY;for(const t of e)t.objectId&&(i=Math.max(i,t.objectId));return i=Math.max(0,i)+1,()=>i++}_assignObjectId(t,e,s=!1){const i=this._queryEngine.objectIdField;t[i]=s&&i in e?e[i]:this._objectIdGenerator()}async _checkProjection(t){try{await(0,c.Nk)(l.KK,t)}catch{throw new r.A("geojson-layer","Projection not supported")}}}},85113:(t,e,s)=>{s.d(e,{BM:()=>w,bd:()=>v,sO:()=>F,xD:()=>h});var i=s(67482),n=s(49186),r=s(21325),o=s(43334),a=s(92722),u=s(30524);const l={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function h(t){return l[t]}function*d(t){switch(t.type){case"Feature":yield t;break;case"FeatureCollection":for(const e of t.features)e&&(yield e)}}function*c(t){if(t)switch(t.type){case"Point":yield t.coordinates;break;case"LineString":case"MultiPoint":yield*t.coordinates;break;case"MultiLineString":case"Polygon":for(const e of t.coordinates)yield*e;break;case"MultiPolygon":for(const e of t.coordinates)for(const t of e)yield*t}}function p(t){for(const e of t)if(e.length>2)return!0;return!1}function f(t){let e=0;for(let s=0;s<t.length;s++){const i=t[s],n=t[(s+1)%t.length];e+=i[0]*n[1]-n[0]*i[1]}return e<=0}function m(t){const e=t[0],s=t[t.length-1];return e[0]===s[0]&&e[1]===s[1]&&e[2]===s[2]||t.push(e),t}function y(t,e,s){switch(e.type){case"LineString":case"MultiPoint":return function(t,e,s){return x(t,e.coordinates,s),t}(t,e,s);case"MultiLineString":return function(t,e,s){for(const i of e.coordinates)x(t,i,s);return t}(t,e,s);case"MultiPolygon":return function(t,e,s){for(const i of e.coordinates){_(t,i[0],s);for(let e=1;e<i.length;e++)g(t,i[e],s)}return t}(t,e,s);case"Point":return function(t,e,s){return b(t,e.coordinates,s),t}(t,e,s);case"Polygon":return function(t,e,s){const i=e.coordinates;_(t,i[0],s);for(let e=1;e<i.length;e++)g(t,i[e],s);return t}(t,e,s)}}function _(t,e,s){const i=m(e);!function(t){return!f(t)}(i)?x(t,i,s):S(t,i,s)}function g(t,e,s){const i=m(e);!function(t){return f(t)}(i)?x(t,i,s):S(t,i,s)}function x(t,e,s){for(const i of e)b(t,i,s);t.lengths.push(e.length)}function S(t,e,s){for(let i=e.length-1;i>=0;i--)b(t,e[i],s);t.lengths.push(e.length)}function b(t,e,s){const[i,n,r]=e;t.coords.push(i,n),s.hasZ&&t.coords.push(r||0)}function I(t){switch(typeof t){case"string":return(0,i.Br)(t)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function F(t,e=4326){if(!t)throw new n.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==t.type&&"FeatureCollection"!==t.type)throw new n.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:t});const{crs:s}=t;if(!s)return;const i="string"==typeof s?s:"name"===s.type?s.properties.name:"EPSG"===s.type?s.properties.code:null,o=(0,r.oT)({wkid:e})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${e})$`,"i");if(!i||!o.test(i))throw new n.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:s})}function w(t,e={}){const s=[],i=new Set,n=new Set;let r,o=!1,a=null,l=!1,{geometryType:f=null}=e,m=!1;for(const e of d(t)){const{geometry:t,properties:d,id:y}=e;if((!t||(f||(f=h(t.type)),h(t.type)===f))&&(o||(o=p(c(t))),l||(l=null!=y,l&&(r=typeof y,d&&(a=Object.keys(d).filter((t=>d[t]===y))))),d&&a&&l&&null!=y&&(a.length>1?a=a.filter((t=>d[t]===y)):1===a.length&&(a=d[a[0]]===y?a:[])),!m&&d)){let t=!0;for(const e in d){if(i.has(e))continue;const r=d[e];if(null==r){t=!1,n.add(e);continue}const o=I(r);if("unknown"===o){n.add(e);continue}n.delete(e),i.add(e);const a=(0,u.rS)(e);a&&s.push({name:a,alias:e,type:o})}m=t}}const y=(0,u.rS)(1===a?.length&&a[0]||null)??void 0;if(y)for(const t of s)if(t.name===y&&(0,u.WA)(t)){t.type="esriFieldTypeOID";break}return{fields:s,geometryType:f,hasZ:o,objectIdFieldName:y,objectIdFieldType:r,unknownFields:Array.from(n)}}function v(t,e){return Array.from(function*(t,e={}){const{geometryType:s,objectIdField:i}=e;for(const n of t){const{geometry:t,properties:r,id:u}=n;if(t&&h(t.type)!==s)continue;const l=r||{};let d;i&&(d=l[i],null==u||d||(l[i]=d=u));const c=new o.Om(t?y(new a.A,t,e):null,l,null,d??void 0);yield c}}(d(t),e))}},64714:(t,e,s)=>{s.d(e,{F0:()=>u,Vx:()=>d,e2:()=>p,f:()=>f});var i=s(44208),n=s(4718),r=s(99352),o=s(4071),a=s(93470);function u(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?a.Cb:"esriGeometryPolyline"===t?a.yM:a.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function d(t,e){if((0,i.A)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let s=`this${c(e)} = null;`;for(const e in t)s+=`this${c(e)} = ${JSON.stringify(t[e])};`;const i=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[e]:null,...t})}}function c(t){return l.test(t)?`.${t}`:`["${t}"]`}function p(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(t)}}]}function f(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:o.$,editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832:(t,e,s)=>{s.d(e,{$1:()=>y,CR:()=>m,MB:()=>c,Yx:()=>u,bP:()=>h});var i=s(67482),n=s(21325),r=s(30524);class o{constructor(){this.code=null,this.description=null}}class a{constructor(t){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=t}}function u(t){return new a(t)}class l{constructor(t){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=t}}function h(t){return new l(t)}const d=new Set;function c(t,e,s,i=!1){d.clear();for(const n in s){const o=t.get(n);if(!o)continue;const a=p(o,s[n]);if(d.add(o.name),o&&(i||o.editable)){const t=(0,r.CJ)(o,a);if(t)return u((0,r.uo)(t,o,a));e[o.name]=a}}for(const e of t?.requiredFields??[])if(!d.has(e.name))return u(`missing required field "${e.name}"`);return null}function p(t,e){let s=e;return(0,r.WA)(t)&&"string"==typeof e?s=parseFloat(e):(0,r.yM)(t)&&null!=e&&"string"!=typeof e?s=String(e):(0,r.vE)(t)&&"string"==typeof e&&(s=(0,i._U)(e)),(0,r.WX)(s)}let f;function m(t,e){if(!t||!(0,n.fn)(e))return t;if("rings"in t||"paths"in t){if(null==f)throw new TypeError("geometry engine not loaded");return f.simplify(e,t)}return t}async function y(t,e){!(0,n.fn)(t)||"esriGeometryPolygon"!==e&&"esriGeometryPolyline"!==e||await async function(){return null==f&&(f=await Promise.all([s.e(9930),s.e(1275)]).then(s.bind(s,47559))),f}()}},4071:(t,e,s)=>{s.d(e,{$:()=>i,P:()=>n});const i={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:i,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},93470:(t,e,s)=>{s.d(e,{Cb:()=>r,HW:()=>h,JR:()=>n,JZ:()=>u,WR:()=>a,b6:()=>d,fT:()=>i,nC:()=>l,yM:()=>o});const i=[252,146,31,255],n=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},u={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4923],{55359:(t,e,s)=>{s.d(e,{q:()=>n});var i=s(57219);class n{constructor(t,e){this._storage=new i.F,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,s=1){this._storage.put(this,t,e,s,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},57219:(t,e,s)=>{s.d(e,{F:()=>a,Mn:()=>o});var i,n,r=s(3694);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(t,e,s){this.name=t,this._storage=e,this.id=u+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(t){return this._storage.getSize(this,t)}resetHitRate(){this._hit=this._miss=0}put(t,e,s,i=0){this._storage.put(this,t,e,s,i)}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}peek(t){return this._storage.peek(this,t)}updateSize(t,e,s){this._storage.updateSize(this,t,e,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.A,this._users=new r.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}getSize(t,e){const s=this._db.get(t.id+e);return s?.size??0}put(t,e,s,n,r){e=t.id+e;const o=this._db.get(e);if(o&&(this._size-=o.size,t.size-=o.size,this._db.delete(e),o.entry!==s&&this._notifyRemove(e,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(e,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${e}`),void this._notifyRemove(e,s,0,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(e,new l(s,n,a)),this._size+=n,t.size+=n,this._checkSize()}updateSize(t,e,s,n){e=t.id+e;const r=this._db.get(e);if(r&&r.entry===s){for(this._size-=r.size,t.size-=r.size;n>this._maxSize;){const t=this._notifyRemove(e,s,n,i.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);n=t}r.size=n,this._size+=n,t.size+=n,this._checkSize()}}pop(t,e){e=t.id+e;const s=this._db.get(e);if(s)return this._size-=s.size,t.size-=s.size,this._db.delete(e),++this._hit,s.entry;++this._miss}get(t,e){e=t.id+e;const s=this._db.get(e);if(void 0!==s)return this._db.delete(e),s.lives=s.lifetime,this._db.set(e,s),++this._hit,s.entry;++this._miss}peek(t,e){const s=this._db.get(t.id+e);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},s=new Array;this._db.forEach(((t,i)=>{const n=t.lifetime;s[n]=(s[n]||0)+t.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=e[r]||0;e[r]=s+t.size}}))}));const i={};this._users.forAll((t=>{const s=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const n=e[s]||0;e[s]=n,i[s]=Math.round(100*t.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(e);n.sort(((t,s)=>e[s]-e[t])),n.forEach((s=>t[s]=Math.round(e[s]/2**20)+"MB / "+i[s]));for(let e=s.length-1;e>=0;--e){const i=s[e];i&&(t["Priority "+(e+-3-1)]=Math.round(i/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,t.size,i.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,t.size,i.ALL))),this._users.forAll((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,s,i){let n;return this._removeFuncs.some((r=>{if(t.startsWith(r[0])){const t=r[1](e,i,s);return"number"==typeof t&&(n=t),!0}return!1})),n}_checkSize(){this._users.forAll((t=>this._checkSizeLimits(t))),this._checkSizeLimits()}_checkSizeLimits(t){const e=t??this;if(e.maxSize<0||e.size<=e.maxSize)return;const s=t?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,t),e.size<=.9*e.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,t),e.size<=.9*e.maxSize))return}_purgeItem(t,e,s=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,s&&(s.size-=e.size);const n=this._notifyRemove(t,e.entry,e.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),e.lives=e.lifetime,e.size=n,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let u=0;class l{constructor(t,e,s){this.entry=t,this.size=e,this.lifetime=s,this.lives=s}}},67482:(t,e,s)=>{function i(t){return null!=a(t)||null!=o(t)}function n(t){return u.test(t)}function r(t){return a(t)??o(t)}function o(t){const e=new Date(t);return function(t,e){if(Number.isNaN(t.getTime()))return!1;let s=!0;if(h&&/\d+\W*$/.test(e)){const t=e.match(/[a-zA-Z]{2,}/);if(t){let e=!1,i=0;for(;!e&&i<=t.length;)e=!l.test(t[i]),i++;s=!e}}return s}(e,t)?Number.isNaN(e.getTime())?null:e.getTime()-6e4*e.getTimezoneOffset():null}function a(t){const e=u.exec(t);if(!e?.groups)return null;const s=e.groups,i=+s.year,n=+s.month-1,r=+s.day,o=+(s.hours??"0"),a=+(s.minutes??"0"),l=+(s.seconds??"0");if(o>23)return null;if(a>59)return null;if(l>59)return null;const h=s.ms??"0",d=h?+h.padEnd(3,"0").slice(0,3):0;let c;if(s.isUTC||!s.offsetSign)c=Date.UTC(i,n,r,o,a,l,d);else{const t=+s.offsetHours,e=+s.offsetMinutes;c=6e4*("+"===s.offsetSign?-1:1)*(60*t+e)+Date.UTC(i,n,r,o,a,l,d)}return Number.isNaN(c)?null:c}s.d(e,{Br:()=>n,Cq:()=>i,_U:()=>r});const u=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,h=!Number.isNaN(new Date("technology 10").getTime())},75503:(t,e,s)=>{s.d(e,{E:()=>w,w:()=>o});var i=s(4576),n=(s(44208),s(3694)),r=s(11006);class o{constructor(t=9,e){this._compareMinX=d,this._compareMinY=c,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),S.prune(),b.prune(),I.prune(),F.prune()}all(t){a(this._data,t)}search(t,e){let s=this._data;const i=this._toBBox;if(g(t,s))for(S.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;g(t,o)&&(s.leaf?e(r):_(t,o)?a(r,e):S.push(r))}s=S.pop()}}collides(t){let e=this._data;const s=this._toBBox;if(!g(t,e))return!1;for(S.clear();e;){for(let i=0,n=e.children.length;i<n;i++){const n=e.children[i],r=e.leaf?s(n):n;if(g(t,r)){if(e.leaf||_(t,r))return!0;S.push(n)}}e=S.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,s=t.length;e<s;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new B([]),this}remove(t){if(!t)return this;let e,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(t);for(I.clear(),F.clear();s||I.length>0;){if(s||(s=I.pop(),n=I.data[I.length-1],r=F.pop()??0,o=!0),s.leaf&&(e=(0,i.qh)(s.children,t,s.children.length,s.indexHint),-1!==e))return s.children.splice(e,1),I.push(s),this._condense(I),this;o||s.leaf||!_(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(I.push(s),F.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,s,i){const n=s-e+1;let r=this._maxEntries;if(n<=r){const i=new B(t.slice(e,s+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new M([]);o.height=i;const a=Math.ceil(n/r),l=a*Math.ceil(Math.sqrt(r));x(t,e,s,l,this._compareMinX);for(let n=e;n<=s;n+=l){const e=Math.min(n+l-1,s);x(t,n,e,a,this._compareMinY);for(let s=n;s<=e;s+=a){const n=Math.min(s+a-1,e);o.children.push(this._build(t,s,n,i-1))}}return u(o,this._toBBox),o}_insert(t,e,s){const i=this._toBBox,n=s?t:i(t);I.clear();const r=function(t,e,s,i){for(;i.push(e),!0!==e.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=p(o),u=m(t,o)-a;u<n?(n=u,i=a<i?a:i,s=o):u===n&&a<i&&(i=a,s=o)}e=s||e.children[0]}return e}(n,this._data,e,I);for(r.children.push(t),h(r,n);e>=0&&I.data[e].children.length>this._maxEntries;)this._split(I,e),e--;!function(t,e,s){for(let i=s;i>=0;i--)h(e.data[i],t)}(n,I,e)}_split(t,e){const s=t.data[e],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return;const o=s.children.splice(r,s.children.length-r),a=s.leaf?new B(o):new M(o);a.height=s.height,u(s,this._toBBox),u(a,this._toBBox),e?t.data[e-1].children.push(a):this._splitRoot(s,a)}_splitRoot(t,e){this._data=new M([t,e]),this._data.height=t.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(t,e,s){let i,n,r;i=n=1/0;for(let o=e;o<=s-e;o++){const e=l(t,0,o,this._toBBox),a=l(t,o,s,this._toBBox),u=y(e,a),h=p(e)+p(a);u<i?(i=u,r=o,n=h<n?h:n):u===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(t,e,s){const i=t.leaf?this._compareMinX:d,n=t.leaf?this._compareMinY:c;this._allDistMargin(t,e,s,i)<this._allDistMargin(t,e,s,n)&&t.children.sort(i)}_allDistMargin(t,e,s,i){t.children.sort(i);const n=this._toBBox,r=l(t,0,e,n),o=l(t,s-e,s,n);let a=f(r)+f(o);for(let i=e;i<s-e;i++){const e=t.children[i];h(r,t.leaf?n(e):e),a+=f(r)}for(let i=s-e-1;i>=e;i--){const e=t.children[i];h(o,t.leaf?n(e):e),a+=f(o)}return a}_condense(t){for(let e=t.length-1;e>=0;e--){const s=t.data[e];if(0===s.children.length)if(e>0){const n=t.data[e-1],r=n.children;r.splice((0,i.qh)(r,s,r.length,n.indexHint),1)}else this.clear();else u(s,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){let s=t;for(b.clear();s;){if(!0===s.leaf)for(const t of s.children)e(t);else b.pushArray(s.children);s=b.pop()??null}}function u(t,e){l(t,0,t.children.length,e,t)}function l(t,e,s,i,n){n||(n=new B([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=e;o<s;o++)r=t.children[o],h(n,t.leaf?i(r):r);return n}function h(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function d(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function p(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function y(t,e){const s=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),n=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function _(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function x(t,e,s,i,n){const o=[e,s];for(;o.length;){const e=o.pop(),s=o.pop();if(e-s<=i)continue;const a=s+Math.ceil((e-s)/i/2)*i;(0,r.q)(t,a,s,e,n),o.push(s,a,a,e)}}const S=new n.A,b=new n.A,I=new n.A,F=new n.A({deallocator:void 0});class w{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class v extends w{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class B extends v{constructor(t){super(),this.children=t,this.leaf=!0}}class M extends v{constructor(t){super(),this.children=t,this.leaf=!1}}},36708:(t,e,s)=>{s.d(e,{C_:()=>c,OH:()=>m,Vh:()=>y,on:()=>d,pc:()=>_,wB:()=>u,z7:()=>l}),s(60999),s(5503);var i=s(37955),n=s(36563),r=s(97768),o=s(74887),a=s(14012);function u(t,e,s={}){return h(t,e,s,p)}function l(t,e,s={}){return h(t,e,s,f)}function h(t,e,s={},i){let n=null;const o=s.once?(t,s)=>{i(t)&&((0,r.xt)(n),e(t,s))}:(t,s)=>{i(t)&&e(t,s)};if(n=(0,a.Cn)(t,o,s.sync,s.equals),s.initial){const e=t();o(e,e)}return n}function d(t,e,s,o={}){let a=null,l=null,h=null;function d(){a&&l&&(l.remove(),o.onListenerRemove?.(a),a=null,l=null)}function c(t){o.once&&o.once&&(0,r.xt)(h),s(t)}const p=u(t,((t,s)=>{d(),(0,i.wb)(t)&&(a=t,l=(0,i.on)(t,e,c),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return h=(0,n.hA)((()=>{p.remove(),d()})),h}function c(t,e){return function(t,e,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=t();if(e?.(i))return Promise.resolve(i);let a=null;function u(){a=(0,r.xt)(a)}return new Promise(((i,r)=>{a=(0,n.vE)([(0,o.u7)(s,(()=>{u(),r((0,o.NK)())})),h(t,(t=>{u(),i(t)}),{sync:!1,once:!0},e??p)])}))}(t,f,e)}function p(t){return!0}function f(t){return!!t}s(80559);const m={sync:!0},y={initial:!0},_={sync:!0,initial:!0}},6518:(t,e,s)=>{s.d(e,{F:()=>a});var i=s(44208),n=s(75503),r=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,i.A)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((s,i)=>{t[e++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.Ie)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,s){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,s)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(t,e,s)=>{s.d(e,{A:()=>f});var i=s(4576),n=s(49186),r=s(65529),o=s(53966),a=s(70328),u=s(19419),l=s(90708),h=s(6518),d=s(51441),c=s(37730);const p=(0,a.vt)();class f{constructor(t){this.geometryInfo=t,this._boundsStore=new h.F,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.A,this.featureAdapter=c.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach((e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;const[e,s,i,n]=this.fullBounds;return{xmin:e,ymin:s,xmax:i,ymax:n,spatialReference:(0,d.ag)(t)}}add(t){this._add(t),this._emitChanged()}addMany(t){for(const e of t)this._add(e);this._emitChanged()}upsertMany(t){const e=t.map((t=>this._upsert(t)));return this._emitChanged(),e.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(t){const e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(const e of t){const t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(const s of t){const t=this._boundsStore.get(s.objectId);t&&e((0,a.Jt)(p,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach((e=>t(e)))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,(t=>{e(this._featuresById.get(t))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let t=!1;this._featuresById.forEach(((e,s)=>{this._markedIds.has(s)||(t=!0,this._remove(e))})),this._markedIds.clear(),t&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;const e=t.objectId;if(null==e)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:t}));const s=this._featuresById.get(e);let i;if(this._markedIds.add(e),s?(t.displayId=s.displayId,i=this._boundsStore.get(e),this._boundsStore.delete(e)):null!=this.onFeatureAdd&&this.onFeatureAdd(t),!t.geometry?.coords?.length)return this._boundsStore.set(e,null),void this._featuresById.set(e,t);i=(0,l.jQ)(null!=i?i:(0,u.vt)(),t.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(e,i),this._featuresById.set(e,t)}_upsert(t){const e=t?.objectId;if(null==e)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:t})),null;const s=this._featuresById.get(e);if(!s)return this._add(t),t;this._markedIds.add(e);const{geometry:i,attributes:r}=t;for(const t in r)s.attributes[t]=r[t];return i&&(s.geometry=i,this._boundsStore.set(e,(0,l.jQ)((0,u.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);const e=t.objectId;return this._markedIds.delete(e),this._boundsStore.delete(e),this._featuresById.delete(e),t}}},37730:(t,e,s)=>{s.d(e,{T:()=>o});var i=s(27647),n=s(43334),r=s(92722);const o={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e)=>new n.Om(e,t.attributes,null,t.objectId),getGeometry:t=>t.geometry,getCentroid:(t,e)=>(null==t.centroid&&(t.centroid=(0,i.Q)(new r.A,t.geometry,e.hasZ,e.hasM)),t.centroid)}},71202:(t,e,s)=>{s.r(e),s.d(e,{default:()=>I});var i=s(78888),n=s(60999),r=s(49186),o=s(53966),a=s(74887),u=s(65864),l=s(21325),h=s(90708),d=s(83221),c=s(31464),p=s(17970),f=s(85113),m=s(64714),y=s(82832),_=s(95466),g=s(98453),x=s(30524),S=s(56400);const b={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!1,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};class I{constructor(){this._queryEngine=null,this._snapshotFeatures=async t=>{const e=await this._fetch(t);return this._createFeatures(e)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(t,e={}){this._loadOptions={url:t.url,customParameters:t.customParameters};const s=[],[i]=await Promise.all([t.url?this._fetch(e?.signal):null,this._checkProjection(t.spatialReference)]),n=(0,f.BM)(i,{geometryType:t.geometryType}),o=t.fields||n.fields||[],a=null!=t.hasZ?t.hasZ:n.hasZ,u=n.geometryType;let h=t.objectIdField||n.objectIdFieldName||"__OBJECTID";const c=t.spatialReference||l.KK;let y=t.timeInfo;o===n.fields&&n.unknownFields.length>0&&s.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:n.unknownFields}});const I=new _.A(o);let F=I.get(h);F?("esriFieldTypeString"!==F.type&&(F.type="esriFieldTypeOID"),F.editable=!1,F.nullable=!1,h=F.name):(F={alias:h,name:h,type:"string"===n.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(F));const w={};for(const t of o){if(null==t.name&&(t.name=t.alias),null==t.alias&&(t.alias=t.name),!t.name)throw new r.A("geojson-layer:invalid-field-name","field name is missing",{field:t});if(!g.m.jsonValues.includes(t.type))throw new r.A("geojson-layer:invalid-field-type",`invalid type for field "${t.name}"`,{field:t});if(t.name!==F.name){const e=(0,x.lD)(t);void 0!==e&&(w[t.name]=e)}null==t.length&&(t.length=(0,x._b)(t))}if(y){if(y.startTimeField){const t=I.get(y.startTimeField);t?(y.startTimeField=t.name,t.type="esriFieldTypeDate"):y.startTimeField=null}if(y.endTimeField){const t=I.get(y.endTimeField);t?(y.endTimeField=t.name,t.type="esriFieldTypeDate"):y.endTimeField=null}if(y.trackIdField){const t=I.get(y.trackIdField);t?y.trackIdField=t.name:(y.trackIdField=null,s.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:y}}))}y.startTimeField||y.endTimeField||(s.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:y}}),y=null)}const v=u?(0,m.F0)(u):void 0,B=I.dateFields.length?{timeZoneIANA:S.n$}:null,M={warnings:s,featureErrors:[],layerDefinition:{...b,drawingInfo:v??void 0,templates:(0,m.e2)(w),extent:void 0,geometryType:u,objectIdField:h,fields:o,hasZ:!!a,timeInfo:y,dateFieldsTimeReference:B}};this._queryEngine=new p.d({fieldsIndex:_.A.fromLayerJSON({fields:o,timeInfo:y,dateFieldsTimeReference:B}),geometryType:u,hasM:!1,hasZ:a,objectIdField:h,spatialReference:c,timeInfo:y,featureStore:new d.A({geometryType:u,hasM:!1,hasZ:a}),cacheSpatialQueries:!0});const z=this._queryEngine.fieldsIndex.requiredFields.indexOf(F);z>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(z,1),this._createDefaultAttributes=(0,m.Vx)(w,h);const E=await this._createFeatures(i);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,E);const A=this._normalizeFeatures(E,M.featureErrors);this._queryEngine.featureStore.addMany(A);const{fullExtent:T,timeExtent:R}=await this._queryEngine.fetchRecomputedExtents();if(M.layerDefinition.extent=T,R){const{start:t,end:e}=R;M.layerDefinition.timeInfo.timeExtent=[t,e]}return M}async applyEdits(t){const{spatialReference:e,geometryType:s}=this._queryEngine;return await Promise.all([(0,y.$1)(e,s),(0,c.Nk)(t.adds,e),(0,c.Nk)(t.updates,e)]),await this._waitSnapshotComplete(),this._applyEdits(t)}async queryFeatures(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(t,e.signal)}async queryFeatureCount(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(t,e.signal)}async queryObjectIds(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(t,e.signal)}async queryExtent(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(t,e.signal)}async querySnapping(t,e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(t,e.signal)}async refresh(t){this._loadOptions.customParameters=t,this._snapshotTask?.abort(),this._snapshotTask=(0,n.UT)(this._snapshotFeatures),this._snapshotTask.promise.then((t=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,t);const e=this._normalizeFeatures(t);e&&this._queryEngine.featureStore.addMany(e)}),(t=>{this._queryEngine.featureStore.clear(),(0,a.zf)(t)||o.A.getLogger("esri.layers.GeoJSONLayer").error(new r.A("geojson-layer:refresh","An error occurred during refresh",{error:t}))})),await this._waitSnapshotComplete();const{fullExtent:e,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:e,timeExtent:s}}async _createFeatures(t){if(null==t)return[];const{geometryType:e,hasZ:s,objectIdField:i}=this._queryEngine,n=(0,f.bd)(t,{geometryType:e,hasZ:s,objectIdField:i});if(!(0,l.aI)(this._queryEngine.spatialReference,l.KK))for(const t of n)null!=t.geometry&&(t.geometry=(0,h.Ux)((0,c.Cv)((0,h.zv)(t.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),l.KK,this._queryEngine.spatialReference)));return n}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:e,customParameters:s}=this._loadOptions,n=(await(0,i.A)(e??"",{responseType:"json",query:{...s},signal:t})).data;return(0,f.sO)(n),n}_normalizeFeatures(t,e){const{objectIdField:s,fieldsIndex:i}=this._queryEngine,n=[];for(const r of t){const t=this._createDefaultAttributes(),o=(0,y.MB)(i,t,r.attributes,!0);o?e?.push(o):(this._assignObjectId(t,r.attributes,!0),r.attributes=t,r.objectId=t[s],n.push(r))}return n}async _applyEdits(t){const{adds:e,updates:s,deletes:i}=t,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(e?.length&&this._applyAddEdits(n,e),s?.length&&this._applyUpdateEdits(n,s),i?.length){for(const t of i)n.deleteResults.push((0,y.bP)(t));this._queryEngine.featureStore.removeManyById(i)}const{fullExtent:r,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:r,timeExtent:o,featureEditResults:n}}_applyAddEdits(t,e){const{addResults:s}=t,{geometryType:i,hasM:n,hasZ:r,objectIdField:o,spatialReference:a,featureStore:l,fieldsIndex:d}=this._queryEngine,p=[];for(const n of e){if(n.geometry&&i!==(0,u.$B)(n.geometry)){s.push((0,y.Yx)("Incorrect geometry type."));continue}const e=this._createDefaultAttributes(),r=(0,y.MB)(d,e,n.attributes);if(r)s.push(r);else{if(this._assignObjectId(e,n.attributes),n.attributes=e,null!=n.uid){const e=n.attributes[o];t.uidToObjectId[n.uid]=e}if(null!=n.geometry){const t=n.geometry.spatialReference??a;n.geometry=(0,c.Cv)((0,y.CR)(n.geometry,t),t,a)}p.push(n),s.push((0,y.bP)(n.attributes[o]))}}l.addMany((0,h.Di)([],p,i,r,n,o))}_applyUpdateEdits({updateResults:t},e){const{geometryType:s,hasM:i,hasZ:n,objectIdField:r,spatialReference:o,featureStore:a,fieldsIndex:l}=this._queryEngine;for(const d of e){const{attributes:e,geometry:p}=d,f=e?.[r];if(null==f){t.push((0,y.Yx)(`Identifier field ${r} missing`));continue}if(!a.has(f)){t.push((0,y.Yx)(`Feature with object id ${f} missing`));continue}const m=(0,h.oN)(a.getFeature(f),s,n,i);if(null!=p){if(s!==(0,u.$B)(p)){t.push((0,y.Yx)("Incorrect geometry type."));continue}const e=p.spatialReference??o;m.geometry=(0,c.Cv)((0,y.CR)(p,e),e,o)}if(e){const s=(0,y.MB)(l,m.attributes,e);if(s){t.push(s);continue}}a.add((0,h.E2)(m,s,n,i,r)),t.push((0,y.bP)(f))}}_createObjectIdGenerator(t,e){const s=t.fieldsIndex.get(t.objectIdField);if("esriFieldTypeString"===s.type)return()=>s.name+"-"+Date.now().toString(16);let i=Number.NEGATIVE_INFINITY;for(const t of e)t.objectId&&(i=Math.max(i,t.objectId));return i=Math.max(0,i)+1,()=>i++}_assignObjectId(t,e,s=!1){const i=this._queryEngine.objectIdField;t[i]=s&&i in e?e[i]:this._objectIdGenerator()}async _checkProjection(t){try{await(0,c.Nk)(l.KK,t)}catch{throw new r.A("geojson-layer","Projection not supported")}}}},85113:(t,e,s)=>{s.d(e,{BM:()=>w,bd:()=>v,sO:()=>F,xD:()=>h});var i=s(67482),n=s(49186),r=s(21325),o=s(43334),a=s(92722),u=s(30524);const l={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function h(t){return l[t]}function*d(t){switch(t.type){case"Feature":yield t;break;case"FeatureCollection":for(const e of t.features)e&&(yield e)}}function*c(t){if(t)switch(t.type){case"Point":yield t.coordinates;break;case"LineString":case"MultiPoint":yield*t.coordinates;break;case"MultiLineString":case"Polygon":for(const e of t.coordinates)yield*e;break;case"MultiPolygon":for(const e of t.coordinates)for(const t of e)yield*t}}function p(t){for(const e of t)if(e.length>2)return!0;return!1}function f(t){let e=0;for(let s=0;s<t.length;s++){const i=t[s],n=t[(s+1)%t.length];e+=i[0]*n[1]-n[0]*i[1]}return e<=0}function m(t){const e=t[0],s=t[t.length-1];return e[0]===s[0]&&e[1]===s[1]&&e[2]===s[2]||t.push(e),t}function y(t,e,s){switch(e.type){case"LineString":case"MultiPoint":return function(t,e,s){return x(t,e.coordinates,s),t}(t,e,s);case"MultiLineString":return function(t,e,s){for(const i of e.coordinates)x(t,i,s);return t}(t,e,s);case"MultiPolygon":return function(t,e,s){for(const i of e.coordinates){_(t,i[0],s);for(let e=1;e<i.length;e++)g(t,i[e],s)}return t}(t,e,s);case"Point":return function(t,e,s){return b(t,e.coordinates,s),t}(t,e,s);case"Polygon":return function(t,e,s){const i=e.coordinates;_(t,i[0],s);for(let e=1;e<i.length;e++)g(t,i[e],s);return t}(t,e,s)}}function _(t,e,s){const i=m(e);!function(t){return!f(t)}(i)?x(t,i,s):S(t,i,s)}function g(t,e,s){const i=m(e);!function(t){return f(t)}(i)?x(t,i,s):S(t,i,s)}function x(t,e,s){for(const i of e)b(t,i,s);t.lengths.push(e.length)}function S(t,e,s){for(let i=e.length-1;i>=0;i--)b(t,e[i],s);t.lengths.push(e.length)}function b(t,e,s){const[i,n,r]=e;t.coords.push(i,n),s.hasZ&&t.coords.push(r||0)}function I(t){switch(typeof t){case"string":return(0,i.Br)(t)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function F(t,e=4326){if(!t)throw new n.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==t.type&&"FeatureCollection"!==t.type)throw new n.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:t});const{crs:s}=t;if(!s)return;const i="string"==typeof s?s:"name"===s.type?s.properties.name:"EPSG"===s.type?s.properties.code:null,o=(0,r.oT)({wkid:e})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${e})$`,"i");if(!i||!o.test(i))throw new n.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:s})}function w(t,e={}){const s=[],i=new Set,n=new Set;let r,o=!1,a=null,l=!1,{geometryType:f=null}=e;for(const e of d(t)){const{geometry:t,properties:d,id:m}=e;if((!t||(f||(f=h(t.type)),h(t.type)===f))&&(o||(o=p(c(t))),l||(l=null!=m,l&&(r=typeof m,d&&(a=Object.keys(d).filter((t=>d[t]===m))))),d&&a&&l&&null!=m&&(a.length>1?a=a.filter((t=>d[t]===m)):1===a.length&&(a=d[a[0]]===m?a:[])),d))for(const t in d){if(i.has(t))continue;const e=I(d[t]);if("unknown"===e){n.add(t);continue}n.delete(t),i.add(t);const r=(0,u.rS)(t);r&&s.push({name:r,alias:t,type:e})}}const m=(0,u.rS)(1===a?.length&&a[0]||null)??void 0;if(m)for(const t of s)if(t.name===m&&(0,u.WA)(t)){t.type="esriFieldTypeOID";break}return{fields:s,geometryType:f,hasZ:o,objectIdFieldName:m,objectIdFieldType:r,unknownFields:Array.from(n)}}function v(t,e){return Array.from(function*(t,e={}){const{geometryType:s,objectIdField:i}=e;for(const n of t){const{geometry:t,properties:r,id:u}=n;if(t&&h(t.type)!==s)continue;const l=r||{};let d;i&&(d=l[i],null==u||d||(l[i]=d=u));const c=new o.Om(t?y(new a.A,t,e):null,l,null,d??void 0);yield c}}(d(t),e))}},64714:(t,e,s)=>{s.d(e,{F0:()=>u,Vx:()=>d,e2:()=>p,f:()=>f});var i=s(44208),n=s(4718),r=s(99352),o=s(4071),a=s(93470);function u(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?a.Cb:"esriGeometryPolyline"===t?a.yM:a.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function d(t,e){if((0,i.A)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let s=`this${c(e)} = null;`;for(const e in t)s+=`this${c(e)} = ${JSON.stringify(t[e])};`;const i=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[e]:null,...t})}}function c(t){return l.test(t)?`.${t}`:`["${t}"]`}function p(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(t)}}]}function f(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:o.$,editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832:(t,e,s)=>{s.d(e,{$1:()=>y,CR:()=>m,MB:()=>c,Yx:()=>u,bP:()=>h});var i=s(67482),n=s(21325),r=s(30524);class o{constructor(){this.code=null,this.description=null}}class a{constructor(t){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=t}}function u(t){return new a(t)}class l{constructor(t){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=t}}function h(t){return new l(t)}const d=new Set;function c(t,e,s,i=!1){d.clear();for(const n in s){const o=t.get(n);if(!o)continue;const a=p(o,s[n]);if(d.add(o.name),o&&(i||o.editable)){const t=(0,r.CJ)(o,a);if(t)return u((0,r.uo)(t,o,a));e[o.name]=a}}for(const e of t?.requiredFields??[])if(!d.has(e.name))return u(`missing required field "${e.name}"`);return null}function p(t,e){let s=e;return(0,r.WA)(t)&&"string"==typeof e?s=parseFloat(e):(0,r.yM)(t)&&null!=e&&"string"!=typeof e?s=String(e):(0,r.vE)(t)&&"string"==typeof e&&(s=(0,i._U)(e)),(0,r.WX)(s)}let f;function m(t,e){if(!t||!(0,n.fn)(e))return t;if("rings"in t||"paths"in t){if(null==f)throw new TypeError("geometry engine not loaded");return f.simplify(e,t)}return t}async function y(t,e){!(0,n.fn)(t)||"esriGeometryPolygon"!==e&&"esriGeometryPolyline"!==e||await async function(){return null==f&&(f=await Promise.all([s.e(9930),s.e(1275)]).then(s.bind(s,47559))),f}()}},4071:(t,e,s)=>{s.d(e,{$:()=>i,P:()=>n});const i={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:i,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},93470:(t,e,s)=>{s.d(e,{Cb:()=>r,HW:()=>h,JR:()=>n,JZ:()=>u,WR:()=>a,b6:()=>d,fT:()=>i,nC:()=>l,yM:()=>o});const i=[252,146,31,255],n=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},u={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4322],{67482:(e,t,n)=>{function r(e){return null!=s(e)||null!=a(e)}function o(e){return l.test(e)}function i(e){return s(e)??a(e)}function a(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let n=!0;if(c&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,r=0;for(;!t&&r<=e.length;)t=!u.test(e[r]),r++;n=!t}}return n}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function s(e){const t=l.exec(e);if(!t?.groups)return null;const n=t.groups,r=+n.year,o=+n.month-1,i=+n.day,a=+(n.hours??"0"),s=+(n.minutes??"0"),u=+(n.seconds??"0");if(a>23)return null;if(s>59)return null;if(u>59)return null;const c=n.ms??"0",p=c?+c.padEnd(3,"0").slice(0,3):0;let d;if(n.isUTC||!n.offsetSign)d=Date.UTC(r,o,i,a,s,u,p);else{const e=+n.offsetHours,t=+n.offsetMinutes;d=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,o,i,a,s,u,p)}return Number.isNaN(d)?null:d}n.d(t,{Br:()=>o,Cq:()=>r,_U:()=>i});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,c=!Number.isNaN(new Date("technology 10").getTime())},85113:(e,t,n)=>{n.d(t,{BM:()=>x,bd:()=>A,sO:()=>v,xD:()=>c});var r=n(67482),o=n(49186),i=n(21325),a=n(43334),s=n(92722),l=n(30524);const u={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function c(e){return u[e]}function*p(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*d(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function y(e){for(const t of e)if(t.length>2)return!0;return!1}function f(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n],o=e[(n+1)%e.length];t+=r[0]*o[1]-o[0]*r[1]}return t<=0}function m(e){const t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function g(e,t,n){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,n){return b(e,t.coordinates,n),e}(e,t,n);case"MultiLineString":return function(e,t,n){for(const r of t.coordinates)b(e,r,n);return e}(e,t,n);case"MultiPolygon":return function(e,t,n){for(const r of t.coordinates){h(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n)}return e}(e,t,n);case"Point":return function(e,t,n){return T(e,t.coordinates,n),e}(e,t,n);case"Polygon":return function(e,t,n){const r=t.coordinates;h(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n);return e}(e,t,n)}}function h(e,t,n){const r=m(t);!function(e){return!f(e)}(r)?b(e,r,n):S(e,r,n)}function w(e,t,n){const r=m(t);!function(e){return f(e)}(r)?b(e,r,n):S(e,r,n)}function b(e,t,n){for(const r of t)T(e,r,n);e.lengths.push(t.length)}function S(e,t,n){for(let r=t.length-1;r>=0;r--)T(e,t[r],n);e.lengths.push(t.length)}function T(e,t,n){const[r,o,i]=t;e.coords.push(r,o),n.hasZ&&e.coords.push(i||0)}function F(e){switch(typeof e){case"string":return(0,r.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function v(e,t=4326){if(!e)throw new o.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new o.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:n}=e;if(!n)return;const r="string"==typeof n?n:"name"===n.type?n.properties.name:"EPSG"===n.type?n.properties.code:null,a=(0,i.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!r||!a.test(r))throw new o.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:n})}function x(e,t={}){const n=[],r=new Set,o=new Set;let i,a=!1,s=null,u=!1,{geometryType:f=null}=t;for(const t of p(e)){const{geometry:e,properties:p,id:m}=t;if((!e||(f||(f=c(e.type)),c(e.type)===f))&&(a||(a=y(d(e))),u||(u=null!=m,u&&(i=typeof m,p&&(s=Object.keys(p).filter((e=>p[e]===m))))),p&&s&&u&&null!=m&&(s.length>1?s=s.filter((e=>p[e]===m)):1===s.length&&(s=p[s[0]]===m?s:[])),p))for(const e in p){if(r.has(e))continue;const t=F(p[e]);if("unknown"===t){o.add(e);continue}o.delete(e),r.add(e);const i=(0,l.rS)(e);i&&n.push({name:i,alias:e,type:t})}}const m=(0,l.rS)(1===s?.length&&s[0]||null)??void 0;if(m)for(const e of n)if(e.name===m&&(0,l.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:f,hasZ:a,objectIdFieldName:m,objectIdFieldType:i,unknownFields:Array.from(o)}}function A(e,t){return Array.from(function*(e,t={}){const{geometryType:n,objectIdField:r}=t;for(const o of e){const{geometry:e,properties:i,id:l}=o;if(e&&c(e.type)!==n)continue;const u=i||{};let p;r&&(p=u[r],null==l||p||(u[r]=p=l));const d=new a.Om(e?g(new s.A,e,t):null,u,null,p??void 0);yield d}}(p(e),t))}},34322:(e,t,n)=>{n.d(t,{E:()=>Z,Fu:()=>M,O8:()=>G,UH:()=>z,YW:()=>O,i5:()=>b,mG:()=>_,x$:()=>U}),n(59456);var r=n(78888),o=n(49186),i=n(5479),a=n(84952),s=n(57251),l=n(21325),u=n(50498),c=n(85113),p=n(13043),d=n(60694),y=n(20437),f=n(30524),m=n(5443),g=n(16930);const h="xlink:href",w="2.0.0",b="__esri_wfs_id__",S="wfs-layer:getWFSLayerTypeInfo-error",T="wfs-layer:empty-service",F="wfs-layer:feature-type-not-found",v="wfs-layer:geojson-not-supported",x="wfs-layer:kvp-encoding-not-supported",A="wfs-layer:malformed-json",N="wfs-layer:unknown-geometry-type",P="wfs-layer:unknown-field-type",C="wfs-layer:unsupported-spatial-reference",k="wfs-layer:unsupported-wfs-version";async function M(e,t){const n=function(e){const t=J(e);(function(e){const t=e.firstElementChild?.getAttribute("version");if(t&&t!==w)throw new o.A(k,`Unsupported WFS version ${t}. Supported version: ${w}`)})(t),W(t);const n=t.firstElementChild,r=(0,i.PP)(function(e){return(0,p.i)(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",defaultSpatialReference:4326,supportedSpatialReferences:[]},n=new Set;return(0,p.p)(e,{Name:e=>{const{name:n,prefix:r}=Y(e.textContent);t.typeName=`${r}:${n}`,t.name=n,t.namespacePrefix=r,t.namespaceUri=e.lookupNamespaceURI(r)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=m.A.fromJSON(function(e){let t,n,r,o;for(const i of e.children)switch(i.localName){case"LowerCorner":[t,n]=i.textContent.split(" ").map((e=>Number.parseFloat(e)));break;case"UpperCorner":[r,o]=i.textContent.split(" ").map((e=>Number.parseFloat(e)))}return{xmin:t,ymin:n,xmax:r,ymax:o,spatialReference:l.KK}}(e))},DefaultCRS:e=>{const r=j(e);r&&(t.defaultSpatialReference=r,n.add(r))},OtherCRS:e=>{const t=j(e);t&&n.add(t)}}),t.title||(t.title=t.name),n.add(4326),t.supportedSpatialReferences.push(...n),t}}})}(n));return{operations:V(n),get featureTypes(){return Array.from(r())},readFeatureTypes:r}}((await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:w,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,a.m3)(e)&&((0,a.FX)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,a.lM)(t.operations.DescribeFeatureType.url)),(0,a.FX)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,a.lM)(t.operations.GetFeature.url)))}(e,n),n}const R=["json","application/json","geojson","application/json; subtype=geojson","application/geo+json"];function E(e){for(const t of R){const n=e.findIndex((e=>e.toLowerCase()===t));if(n>=0)return e[n]}return null}function V(e){let t=!1;const n={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}},r=[],i=[];if((0,p.p)(e,{OperationsMetadata:{Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:({textContent:e})=>{e&&r.push(e)}}}},Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{n.GetCapabilities.url=e.getAttribute(h)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{n.DescribeFeatureType.url=e.getAttribute(h)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{n.GetFeature.url=e.getAttribute(h)}}},Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:({textContent:e})=>{e&&i.push(e)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{n.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),n.GetFeature.outputFormat=E(i)??E(r),!t)throw new o.A(x,"WFS service doesn't support key/value pair (KVP) encoding");if(null==n.GetFeature.outputFormat)throw new o.A(v,"WFS service doesn't support GeoJSON output format");return n}function j(e){const t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);if(!Number.isNaN(t))return t}function _(e,t,n){return(0,i.I6)(e,(e=>n?e.name===t&&e.namespaceUri===n:e.typeName===t||e.name===t))}async function G(e,t,n,r={}){const{featureType:i,extent:a}=await async function(e,t,n,r={}){const i=e.readFeatureTypes(),a=t?_(i,t,n):i.next().value,{spatialReference:u=new g.A({wkid:a?.defaultSpatialReference})}=r;if(null==a)throw t?new o.A(F,`The type '${t}' could not be found in the service`):new o.A(T,"The service is empty");let c=a.extent;if(c&&!(0,l.aI)(c.spatialReference,u))try{await(0,s.initializeProjection)(c.spatialReference,u,void 0,r),c=(0,s.project)(c,u)}catch{throw new o.A(C,"Projection not supported")}return{extent:c,spatialReference:u,featureType:a}}(e,t,n,r),{spatialReference:u}=z(e.operations.GetFeature.url,i,r.spatialReference),{fields:c,geometryType:p,swapXY:d,objectIdField:y,geometryField:f}=await async function(e,t,n,r={}){const{typeName:i}=t,[a,s]=await Promise.allSettled([I(e.operations.DescribeFeatureType.url,i,r),D(e,i,n,r)]),l=e=>new o.A(S,`An error occurred while getting info about the feature type '${i}'`,{error:e});if("rejected"===a.status)throw l(a.reason);if("rejected"===s.status)throw l(s.reason);const{fields:u,errors:c}=a.value??{},p=a.value?.geometryType||s.value?.geometryType,d=s.value?.swapXY??!1;if(null==p)throw new o.A(N,`The geometry type could not be determined for type '${i}`,{typeName:i,geometryType:p,fields:u,errors:c});return{...O(u??[]),geometryType:p,swapXY:d}}(e,i,u,r);return{url:e.operations.GetCapabilities.url,name:i.name,namespaceUri:i.namespaceUri,fields:c,geometryField:f,geometryType:p,objectIdField:y,spatialReference:r.spatialReference??new g.A({wkid:i.defaultSpatialReference}),extent:a,swapXY:d,wfsCapabilities:e,customParameters:r.customParameters}}function O(e){const t=e.find((e=>"geometry"===e.type));let n=e.find((e=>"oid"===e.type));return e=e.filter((e=>"geometry"!==e.type)),n||(n=new y.A({name:b,type:"oid",alias:b}),e.unshift(n)),{geometryField:t?.name??null,objectIdField:n.name,fields:e}}async function D(e,t,n,o={}){let i,a=!1;const[s,l]=await Promise.all([U(e.operations.GetFeature.url,t,n,e.operations.GetFeature.outputFormat,{...o,count:1}),(0,r.A)(e.operations.GetFeature.url,{responseType:"text",query:L(t,n,void 0,{...o,count:1}),signal:o?.signal})]),p="FeatureCollection"===s.type&&s.features[0]?.geometry;if(p){let e;switch(i=u.g.fromJSON((0,c.xD)(p.type)),p.type){case"Point":e=p.coordinates;break;case"LineString":case"MultiPoint":e=p.coordinates[0];break;case"MultiLineString":case"Polygon":e=p.coordinates[0][0];break;case"MultiPolygon":e=p.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(l.data);if(t){const n=e[0].toFixed(3),r=e[1].toFixed(3),o=parseFloat(t[1]).toFixed(3);n===parseFloat(t[2]).toFixed(3)&&r===o&&(a=!0)}}return{geometryType:i,swapXY:a}}async function I(e,t,n){return function(e,t){const{name:n}=Y(e),r=J(t);W(r);const a=(0,i.I6)((0,p.i)(r.firstElementChild,{element:e=>e}),(e=>e.getAttribute("name")===n));if(null!=a){const e=a.getAttribute("type"),t=e?(0,i.I6)((0,p.i)(r.firstElementChild,{complexType:e=>e}),(t=>t.getAttribute("name")===Y(e).name)):(0,i.I6)((0,p.i)(a,{complexType:e=>e}),(()=>!0));if(t)return function(e){const t=[],n=[];let r;const i=(0,p.i)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const a of i){const i=a.getAttribute("name");if(!i)continue;let s,l;if(a.hasAttribute("type")?s=Y(a.getAttribute("type")).name:(0,p.p)(a,{simpleType:{restriction:e=>(s=Y(e.getAttribute("base")).name,{maxLength:e=>{l=+e.getAttribute("value")}})}}),!s)continue;const u="true"===a.getAttribute("nillable");let c=!1;switch(s.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":n.push(new y.A({name:i,alias:i,type:"integer",nullable:u,length:(0,f._b)("integer")}));break;case"float":case"double":case"decimal":n.push(new y.A({name:i,alias:i,type:"double",nullable:u,length:(0,f._b)("double")}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":n.push(new y.A({name:i,alias:i,type:"string",nullable:u,length:l??(0,f._b)("string")}));break;case"datetime":case"date":n.push(new y.A({name:i,alias:i,type:"date",nullable:u,length:l??(0,f._b)("date")}));break;case"pointpropertytype":r="point",c=!0;break;case"multipointpropertytype":r="multipoint",c=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":r="polyline",c=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":r="polygon",c=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":c=!0,t.push(new o.A(N,`geometry type '${s}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:t.push(new o.A(P,`Unknown field type '${s}'`,{type:(new XMLSerializer).serializeToString(e)}))}c&&n.push(new y.A({name:i,alias:i,type:"geometry",nullable:u}))}for(const e of n)if("integer"===e.type&&!e.nullable&&$.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:r,fields:n,errors:t}}(t)}throw new o.A(F,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(r)})}(t,(await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:w,TYPENAME:t,TYPENAMES:t,...n?.customParameters},signal:n?.signal})).data)}const $=new Set(["objectid","fid"]);async function U(e,t,n,i,a){let{data:s}=await(0,r.A)(e,{responseType:"text",query:L(t,n,i,a),signal:a?.signal});s=s.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{return JSON.parse(s)}catch(e){throw new o.A(A,"Error while parsing the response",{response:s,error:e})}}function L(e,t,n,r){const o="number"==typeof t?t:t.wkid;return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:e,OUTPUTFORMAT:n,SRSNAME:"EPSG:"+o,STARTINDEX:r?.startIndex,COUNT:r?.count,...r?.customParameters}}async function Z(e,t,n){const o=await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:t,RESULTTYPE:"hits",...n?.customParameters},signal:n?.signal}),i=/numberMatched=["'](?<numberMatched>\d+)["']/gi.exec(o.data);if(i?.groups)return+i.groups.numberMatched}function J(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function Y(e){const[t,n]=e.split(":");return{prefix:n?t:"",name:n??t}}function W(e){let t="",n="";if((0,p.p)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{n=e.textContent}})}),t)throw new o.A(`wfs-layer:${t}`,n)}function z(e,t,n){const r={wkid:t.defaultSpatialReference},o=null!=n?.wkid?{wkid:n.wkid}:r;return{spatialReference:o,getFeatureSpatialReference:(0,d.Fi)(e)||o.wkid&&t.supportedSpatialReferences.includes(o.wkid)?{wkid:o.wkid}:{wkid:t.defaultSpatialReference}}}},13043:(e,t,n)=>{function r(e,t){if(e&&t)for(const n of e.children)if(n.localName in t){const e=t[n.localName];if("function"==typeof e){const t=e(n);t&&r(n,t)}else r(n,e)}}function*o(e,t){for(const n of e.children)if(n.localName in t){const e=t[n.localName];"function"==typeof e?yield e(n):yield*o(n,e)}}n.d(t,{i:()=>o,p:()=>r})},20437:(e,t,n)=>{n.d(t,{A:()=>g});var r,o=n(90237),i=n(66552),a=n(25482),s=n(10107),l=n(56507),u=(n(87811),n(44208),n(93223)),c=n(36005),p=n(40608),d=n(72088),y=n(98453);const f=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 m=r=class extends a.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,o._)([(0,s.MZ)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,o._)([(0,s.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,o._)([(0,s.MZ)()],m.prototype,"description",void 0),(0,o._)([(0,c.w)("description")],m.prototype,"readDescription",null),(0,o._)([(0,s.MZ)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],m.prototype,"domain",void 0),(0,o._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,o._)([(0,s.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,o._)([(0,s.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,o._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,o._)([(0,u.e)(y.m)],m.prototype,"type",void 0),(0,o._)([(0,s.MZ)()],m.prototype,"valueType",void 0),(0,o._)([(0,c.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,o._)([(0,s.MZ)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=r=(0,o._)([(0,p.$)("esri.layers.support.Field")],m);const g=m},72088:(e,t,n)=>{n.d(t,{rS:()=>x,gK:()=>v}),n(44208);var r,o=n(90237),i=n(4718),a=n(10107),s=(n(53966),n(93223)),l=n(40608),u=n(25482);n(87811);let c=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,o._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,a.MZ)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=r=(0,o._)([(0,l.$)("esri.layers.support.CodedValue")],c);const p=new(n(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,o._)([(0,s.e)(p)],d.prototype,"type",void 0),d=(0,o._)([(0,l.$)("esri.layers.support.Domain")],d);const y=d;var f;let m=f=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,i.o8)(this.codedValues),name:this.name})}};(0,o._)([(0,a.MZ)({type:[c],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,o._)([(0,s.e)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=f=(0,o._)([(0,l.$)("esri.layers.support.CodedValueDomain")],m);const g=m;var h;n(49186);let w=h=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new h}};(0,o._)([(0,s.e)({inherited:"inherited"})],w.prototype,"type",void 0),w=h=(0,o._)([(0,l.$)("esri.layers.support.InheritedDomain")],w);const b=w;var S;let T=S=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new S({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,a.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]}}}})],T.prototype,"maxValue",void 0),(0,o._)([(0,a.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]}}}})],T.prototype,"minValue",void 0),(0,o._)([(0,s.e)({range:"range"})],T.prototype,"type",void 0),T=S=(0,o._)([(0,l.$)("esri.layers.support.RangeDomain")],T);const F=T,v={key:"type",base:y,typeMap:{range:T,"coded-value":g,inherited:b}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return F.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5242],{9775:(e,t,r)=>{r.d(t,{A:()=>i});var s=r(62788),n=r(95488);class i{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new n.I,this._items=new Set}get length(){return(0,s.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.gc)(this._observable),yield*this._items}}},75503:(e,t,r)=>{r.d(t,{E:()=>M,w:()=>o});var s=r(4576),n=(r(44208),r(3694)),i=r(11006);class o{constructor(e=9,t){this._compareMinX=u,this._compareMinY=h,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),v.prune(),I.prune(),T.prune()}all(e){a(this._data,e)}search(e,t){let r=this._data;const s=this._toBBox;if(_(e,r))for(w.clear();r;){for(let n=0,i=r.children.length;n<i;n++){const i=r.children[n],o=r.leaf?s(i):i;_(e,o)&&(r.leaf?t(i):g(e,o)?a(i,t):w.push(i))}r=w.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!_(e,t))return!1;for(w.clear();t;){for(let s=0,n=t.children.length;s<n;s++){const n=t.children[s],i=t.leaf?r(n):n;if(_(e,i)){if(t.leaf||g(e,i))return!0;w.push(n)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new A([]),this}remove(e){if(!e)return this;let t,r=this._data,n=null,i=0,o=!1;const a=this._toBBox(e);for(I.clear(),T.clear();r||I.length>0;){if(r||(r=I.pop(),n=I.data[I.length-1],i=T.pop()??0,o=!0),r.leaf&&(t=(0,s.qh)(r.children,e,r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),I.push(r),this._condense(I),this;o||r.leaf||!g(r,a)?n?(i++,r=n.children[i],o=!1):r=null:(I.push(r),T.push(i),i=0,n=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,s){const n=r-t+1;let i=this._maxEntries;if(n<=i){const s=new A(e.slice(t,r+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(i)),i=Math.ceil(n/i**(s-1)));const o=new x([]);o.height=s;const a=Math.ceil(n/i),p=a*Math.ceil(Math.sqrt(i));b(e,t,r,p,this._compareMinX);for(let n=t;n<=r;n+=p){const t=Math.min(n+p-1,r);b(e,n,t,a,this._compareMinY);for(let r=n;r<=t;r+=a){const n=Math.min(r+a-1,t);o.children.push(this._build(e,r,n,s-1))}}return l(o,this._toBBox),o}_insert(e,t,r){const s=this._toBBox,n=r?e:s(e);I.clear();const i=function(e,t,r,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==r;){let r,s=1/0,n=1/0;for(let i=0,o=t.children.length;i<o;i++){const o=t.children[i],a=c(o),l=m(e,o)-a;l<n?(n=l,s=a<s?a:s,r=o):l===n&&a<s&&(s=a,r=o)}t=r||t.children[0]}return t}(n,this._data,t,I);for(i.children.push(e),d(i,n);t>=0&&I.data[t].children.length>this._maxEntries;)this._split(I,t),t--;!function(e,t,r){for(let s=r;s>=0;s--)d(t.data[s],e)}(n,I,t)}_split(e,t){const r=e.data[t],s=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,s);const i=this._chooseSplitIndex(r,n,s);if(!i)return;const o=r.children.splice(i,r.children.length-i),a=r.leaf?new A(o):new x(o);a.height=r.height,l(r,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,t){this._data=new x([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let s,n,i;s=n=1/0;for(let o=t;o<=r-t;o++){const t=p(e,0,o,this._toBBox),a=p(e,o,r,this._toBBox),l=f(t,a),d=c(t)+c(a);l<s?(s=l,i=o,n=d<n?d:n):l===s&&d<n&&(n=d,i=o)}return i}_chooseSplitAxis(e,t,r){const s=e.leaf?this._compareMinX:u,n=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,r,s)<this._allDistMargin(e,t,r,n)&&e.children.sort(s)}_allDistMargin(e,t,r,s){e.children.sort(s);const n=this._toBBox,i=p(e,0,t,n),o=p(e,r-t,r,n);let a=y(i)+y(o);for(let s=t;s<r-t;s++){const t=e.children[s];d(i,e.leaf?n(t):t),a+=y(i)}for(let s=r-t-1;s>=t;s--){const t=e.children[s];d(o,e.leaf?n(t):t),a+=y(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const n=e.data[t-1],i=n.children;i.splice((0,s.qh)(i,r,i.length,n.indexHint),1)}else this.clear();else l(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let r=e;for(v.clear();r;){if(!0===r.leaf)for(const e of r.children)t(e);else v.pushArray(r.children);r=v.pop()??null}}function l(e,t){p(e,0,e.children.length,t,e)}function p(e,t,r,s,n){n||(n=new A([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let i,o=t;o<r;o++)i=e.children[o],d(n,e.leaf?s(i):i);return n}function d(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function u(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function y(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){const r=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),i=Math.min(e.maxY,t.maxY);return Math.max(0,n-r)*Math.max(0,i-s)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function b(e,t,r,s,n){const o=[t,r];for(;o.length;){const t=o.pop(),r=o.pop();if(t-r<=s)continue;const a=r+Math.ceil((t-r)/s/2)*s;(0,i.q)(e,a,r,t,n),o.push(r,a,a,t)}}const w=new n.A,v=new n.A,I=new n.A,T=new n.A({deallocator:void 0});class M{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class E extends M{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class A extends E{constructor(e){super(),this.children=e,this.leaf=!0}}class x extends E{constructor(e){super(),this.children=e,this.leaf=!1}}},10382:(e,t,r)=>{r.d(t,{A:()=>p});var s=r(36563),n=(r(44208),r(74887)),i=r(9775),o=r(72457),a=r(52268),l=r(61322);class p{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new i.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,s)=>{let i=!0;const o=e=>{(0,n.Te)(t.signal),i&&(i=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let i=0;i<e.length;++i){const a=e[i];(0,n.$X)(a)?this._clientPromises[i]=a.then((e=>(this._clients[i]=new l.default(e,t,this._ongoingJobsQueue),o(r),this._clients[i])),(()=>(o(s),null))):(this._clients[i]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[i]=Promise.resolve(this._clients[i]),o(r))}}))}broadcast(e,t,r){const s=new Array(this._clientPromises.length);for(let n=0;n<this._clientPromises.length;++n){const i=this._clientPromises[n];s[n]=i.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,n.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.h)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const s=(0,n.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:s});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return s.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.vE)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((n=>{n&&(t[s]=n.openPort()),0==--r&&e(t)}))}))}get test(){}}},72457:(e,t,r)=>{r.d(t,{h:()=>i,k:()=>n});const s=new FinalizationRegistry((e=>{e.close()}));function n(e,t){s.register(e,t,t)}function i(e){s.unregister(e)}},29953:(e,t,r)=>{r.d(t,{ho:()=>G});var s=r(49186),n=r(44208),i=r(74887),o=r(10382),a=r(72457),l=r(61322),p=r(53966),d=r(97768),u=r(78888),h=r(84952);const c={async request(e,t){const r=e.options,s=r.responseType;r.signal=t?.signal,r.responseType="native"===s||"native-request-init"===s?"native-request-init":s&&["blob","json","text"].includes(s)&&(0,h.sC)(e.url)?.after?s:"array-buffer";const n=await(0,u.A)(e.url,r),i={data:n.data,httpStatus:n.httpStatus,ssl:n.ssl};switch(n.requestOptions?.responseType){case"native-request-init":return delete i.data.signal,i;case"blob":i.data=await i.data.arrayBuffer();break;case"json":i.data=(new TextEncoder).encode(JSON.stringify(i.data)).buffer;break;case"text":i.data=(new TextEncoder).encode(i.data).buffer}return{result:i,transferList:[i.data]}}};var y=r(8341),m=r(2741),f=r(92602),g=(r(47566),r(70333));const _={};var b=r(26390);class w{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class v{constructor(){this._dispatcher=new w,this._workerPostMessage({type:y.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,b.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,b.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,y.VI)(e);if(t&&t.type===y.Go.OPEN){const{modulePath:e,jobId:r}=t;let s=await l.default.loadWorker(e);s||(s=await import(e));const n=l.default.connect(s);this._workerPostMessage({type:y.Go.OPENED,jobId:r,data:n})}}}var I=r(73444),T=r(18357);const M=()=>p.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:E}=y.Go;let A,x;const k="Failed to create Worker. Fallback to execute module in main thread";async function S(e){return new Promise((t=>{function r(n){const i=(0,y.VI)(n);i&&i.type===E&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),M().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new v).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let C=0;const{ABORT:L,INVOKE:N,OPEN:D,OPENED:R,RESPONSE:B}=y.Go;class O{static async create(e){const t=await async function(){if(!(0,n.A)("esri-workers"))return S(new v);if(!A&&!x)try{const e='let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;let s=null;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})})).finally((()=>{t&&t.removeEventListener("abort",s)}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\nModules version: ${r}\nAssets version: ${n??s}\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split("{CONFIGURATION}").join(function(){let e;if(null!=f.A.default){const t={...f.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(f.A));e.assetsPath=(0,h.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,h.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,I.JK)(),e.has={"esri-csp-restrictions":(0,n.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,n.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,n.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,n.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,n.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,n.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,n.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,n.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,n.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,n.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,n.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,n.A)("esri-atomics"),"esri-shared-array-buffer":(0,n.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,n.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,n.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,n.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,h.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,h.s2)(e.workers.workerPath):e.workers.workerPath=(0,h.s2)((0,m.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.A.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.slice()||[],paths:{..._.paths,...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=_.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,I.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:T.$,fullVersion:g.ol,revision:T.u};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}());A=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){x=e||{}}let e;if(A)try{e=new Worker(A,{name:"esri-worker-"+C++})}catch(t){M().warn(k,x),e=new v}else M().warn(k,x),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(),p.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,y.Jc)();return new Promise(((t,n)=>{const o={resolve:t,reject:n,abortHandle:(0,i.NY)(r,(()=>{this._outJobs.delete(s),this._post({type:L,jobId:s})}))};this._outJobs.set(s,o),this._post({type:D,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,y.VI)(e);if(t)switch(t.type){case R:this._onOpenedMessage(t);break;case B:this._onResponseMessage(t);break;case L:this._onAbortMessage(t);break;case N:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:n}=e,o=n?new AbortController:null,a=this._inJobs,l=c[t];let p;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);p=l.call(null,s,{signal:o?o.signal:null})}catch(e){return void this._post({type:B,jobId:r,error:(0,y.mF)(e)})}(0,i.$X)(p)?(a.set(r,{controller:o,promise:p}),p.then((e=>{a.has(r)&&(a.delete(r),this._post({type:B,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,i.zf)(e)||this._post({type:B,jobId:r,error:(0,y.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:B,jobId:r},p)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,d.xt)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:n}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,d.xt)(i.abortHandle),r?i.reject(s.A.fromJSON(JSON.parse(r))):i.resolve(n))}_post(e,t,r){return(0,y.u1)(this.worker,e,t,r)}}const j=(0,n.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,n.A)("workers-pool-size")):0;let P=(0,n.A)("esri-mobile")?Math.min(j,3):j;P||(P=(0,n.A)("safari")&&(0,n.A)("mac")?7:2);let F=0;const q=[];async function Z(e,t){const r=new o.A,{registryTarget:s,...n}=t;return await r.open(e,n),s&&(0,a.k)(s,r),r}async function G(e,t={}){if("string"!=typeof e)throw new s.A("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,n.A)("host-webworker")&&!(0,n.A)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,i.Te)(t.signal);const s=t.client||r;return Z([l.default.connect(r,t.schedule)],{...t,client:s})}if(await async function(){if(Q)return Q;$=new AbortController;const e=[];for(let t=0;t<P;t++){const r=O.create(t).then((e=>(q[t]=e,e)));e.push(r)}return Q=Promise.all(e),Q}(),(0,i.Te)(t.signal),"dedicated"===r){const r=F++%P;return Z([await q[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,P);if(r<P){const s=new Array(r);for(let n=0;n<r;++n){const r=F++%P;s[n]=q[r].open(e,t)}return Z(s,t)}}return Z(q.map((r=>r.open(e,t))),t)}let $,Q=null},6518:(e,t,r)=>{r.d(t,{F:()=>a});var s=r(44208),n=r(75503),i=r(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,s.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((r,s)=>{e[t++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,i.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,r){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,r)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,r)=>{r.d(t,{A:()=>y});var s=r(4576),n=r(49186),i=r(65529),o=r(53966),a=r(70328),l=r(19419),p=r(90708),d=r(6518),u=r(51441),h=r(37730);const c=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new d.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,r,s,n]=this.fullBounds;return{xmin:t,ymin:r,xmax:s,ymax:n,spatialReference:(0,u.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(s.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const r of e){const e=this._boundsStore.get(r.objectId);e&&t((0,a.Jt)(c,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,r)=>{this._markedIds.has(r)||(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 n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const r=this._featuresById.get(t);let s;if(this._markedIds.add(t),r?(e.displayId=r.displayId,s=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);s=(0,p.jQ)(null!=s?s:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=s&&this._boundsStore.set(t,s),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const r=this._featuresById.get(t);if(!r)return this._add(e),e;this._markedIds.add(t);const{geometry:s,attributes:i}=e;for(const e in i)r.attributes[e]=i[e];return s&&(r.geometry=s,this._boundsStore.set(t,(0,p.jQ)((0,l.vt)(),s,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),r}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},37730:(e,t,r)=>{r.d(t,{T:()=>o});var s=r(27647),n=r(43334),i=r(92722);const o={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new n.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,s.Q)(new i.A,e.geometry,t.hasZ,t.hasM)),e.centroid)}},64714:(e,t,r)=>{r.d(t,{F0:()=>l,Vx:()=>u,e2:()=>c,f:()=>y});var s=r(44208),n=r(4718),i=r(99352),o=r(4071),a=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const p=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let d=1;function u(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${h(t)} = null;`;for(const t in e)r+=`this${h(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${d++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function h(e){return p.test(e)?`.${e}`:`["${e}"]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},61184:(e,t,r)=>{r.d(t,{P:()=>M});var s=r(90237),n=(r(59456),r(69622)),i=r(49186),o=r(53966),a=r(91869),l=r(39516),p=r(10107),d=(r(44208),r(87811),r(40608)),u=r(39829),h=r(57251),c=r(21325),y=r(85342),m=r(90708),f=r(43334),g=r(65864);class _{constructor(){this._featureLookup=new Map}static getInstance(){return _.instance||(_.instance=new _),_.instance}static resetInstance(){_.instance&&(_.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const r=this.readFromStoreById(e);r&&t.push(r)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,r){const s=[];return e.forEach((e=>{if(!e?.id)return;e.properties||(e.properties=[]);let n,i=null;if(r&&e.properties[r]&&(i=(0,m.Ux)(e.properties[r])),"originId"in e&&"destinationId"in e&&(e.properties[y.Cz]=e.originId,e.properties[y.KQ]=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const s=this._featureLookup.get(e.id),o=JSON.parse(JSON.stringify(Object.assign(s.attributes,e.properties)));r&&e.properties[r]&&(o[r]=(0,g.rS)(e.properties[r])),n=new f.Om(i?JSON.parse(JSON.stringify(i)):s?.geometry?JSON.parse(JSON.stringify(s.geometry)):null,o,null,e.properties[t])}else n=new f.Om(i?JSON.parse(JSON.stringify(i)):null,e.properties,null,e.properties[t]);this._featureLookup.set(e.id,n),s.push(n)})),s}}var b=r(45654),w=r(71402),v=r(42538),I=r(61956),T=r(5443);let M=class extends n.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach((r=>{r.name&&(t.set(r.name,"entity"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((r=>{r.name&&(t.set(r.name,"relationship"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((r,s)=>{if("entity"===t.get(s))this.entityTypeNames.add(s);else{if("relationship"!==t.get(s))return o.A.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(s);this.relationshipTypeNames.add(s)}const n=new Map;r.members?.forEach((e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,(()=>new Set)).add(s);const t=this.getById(e.id);t&&n.set(e.id,t)})),this.sublayerCaches.set(s,n)}))}addToLayer(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new i.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const r=this.inclusionModeDefinition.namedTypeDefinitions.get(e);r.members||(r.members=new Map),r.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}else{const r=new Map;r.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:r}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}))}getById(e){return _.getInstance().readFromStoreById(e)}async getData(e,t,r){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let s;if(s=e||new I.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,r=this._processingCacheUpdatesLookup.get(t.objectType.name??""),n=s.outFields;n&&1===n.length&&n[0]===y.dr&&"1=1"===s.where||await Promise.all(r??[]);const i=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return i.forEach((r=>{if(this.relationshipTypeNames.has(t.objectType.name)){r.geometry=e.relationshipLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);const s=this.memberIdTypeLookup.get(r.attributes[y.Cz]),n=this.memberIdTypeLookup.get(r.attributes[y.KQ]),i=this._isEndEntitySpatial(s,r,y.Cz),o=this._isEndEntitySpatial(n,r,y.KQ);r.attributes[y.BL]=Number(i&&o)}else{r.geometry=e.entityLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);const s=this.geographicLookup.get(t.objectType.name);s&&r.attributes[s.name]?r.attributes[y.BL]=1:r.attributes[y.BL]=0}r.attributes[y.T1]=r.geometry,o.push(r)})),o}return this.retrieveDataFromService(s,t,r)}async getConnectedRecordIds(e,t){const r=[];let s="";const n=[],i=new Map;if(e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(t))return;i.has(t)?i.get(t)?.push(e):i.set(t,[e])}})),t&&0!==t?.length){for(const e of t)s=s+e+"|";s=s.slice(0,-1)}const a={};let l="",p=-1;for(const[e,r]of i){p++,0!==p&&(l+=" UNION ");const n=`${e}_ids`;a[n]=r,l+=t&&0!==t?.length?`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r:${s}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`:`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`}const d=new Promise((e=>{(async()=>{const e=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new v.A({openCypherQuery:l,bindParameters:a}))).resultRowsStream.getReader();try{for(;;){const{done:t,value:s}=await e.read();if(t)break;for(let e=0;e<s.length;e++){const t=s[e];r.push({id:t[0],typeName:t[1]}),r.push({id:t[2],typeName:t[3]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}})().then((()=>{e()}))}));return n.push(d),this.refreshCacheContent(),await Promise.all(n),r}async getRelationshipsBetweenNodes(e,t){const r=[],s=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new v.A({openCypherQuery:"MATCH (n)-[r]->(m) WHERE id(n) IN $nodeIds AND id(m) in $nodeIds AND NOT id(r) IN $relationshipExclusionIds return id(r), type(r)",bindParameters:{nodeIds:e,relationshipExclusionIds:t}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await s.read();if(e)break;for(let e=0;e<t.length;e++){const s=t[e];r.push({id:s[0],typeName:s[1]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}return r}async getRelationshipsFromNodes(e,t,r){const s=[],n=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new v.A({openCypherQuery:"MATCH (n)-[r]-(m) WHERE id(n) IN $targetEntityIds AND id(m) in $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds return id(r), type(r)",bindParameters:{targetEntityIds:e,possibleConnectionEntityIds:t,relationshipExclusionIds:r}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await n.read();if(e)break;for(let e=0;e<t.length;e++){const r=t[e];s.push({id:r[0],typeName:r[1]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}return s}async refreshCacheContent(e,t,r,s=!0){const n=_.getInstance(),o=[],l=new Map,p=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&p.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&p.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,d]of l){const l=new Promise((o=>{(async()=>{const o=new Set,l=[];let u,h="",c=!1;if(t||p.get(e)?.properties?.forEach((e=>{e.name&&o.add(e.name)})),r&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&o.add(t)}if(this.entityTypeNames.has(e))h=`MATCH (n:${e}) ${d?"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}]->() ${d?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,o.forEach((e=>{h+=`, n.${e}`,l.push(e)}))}u=new v.A(d?{openCypherQuery:h,bindParameters:{ids:d}}:{openCypherQuery:h});const m=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,u)).resultRowsStream.getReader();for(;;){const{done:t,value:r}=await m.read();if(t)break;const i=[];for(let e=0;e<r.length;e++){const t=r[e];let s=0,n=0;const o={properties:{}};for(o.id=t[s],s++,n++,c&&(o.originId=t[s],s++,n++,o.destinationId=t[s],s++,n++,(0,a.tE)(this.nodeConnectionsLookup,o.originId,(()=>new Set)).add(o.id),(0,a.tE)(this.nodeConnectionsLookup,o.destinationId,(()=>new Set)).add(o.id),(0,a.tE)(this.relationshipConnectionsLookup,o.id,(()=>[o.originId,o.destinationId])));s<t.length;s++)o.properties[l[s-n]]=t[s];i.push(o)}const o=n.writeToStore(i,y.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),s&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),s&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const p=this.sublayerCaches.get(e);o.forEach((t=>{p?.set(t.attributes[y.dr],t),s&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[y.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[y.dr],{id:t.attributes[y.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[y.dr],(()=>new Set)).add(e))}))}})().then((()=>{o(null)}))}));o.push(l),this._processingCacheUpdatesLookup.get(e)?.push(l)}await Promise.all(o)}removeFromLayer(e){const t=new Set,r=new Set(e.map((e=>e.id)));for(const r of e)t.add(r.typeName),1===this.memberIdTypeLookup.get(r.id)?.size?this.memberIdTypeLookup.delete(r.id):this.memberIdTypeLookup.get(r.id)?.delete(r.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{t===r.typeName&&e.members?.has(r.id)&&e.members.delete(r.id)}));t.forEach((e=>{this.sublayerCaches.get(e)?.forEach(((t,s)=>{r.has(s)&&this.sublayerCaches.get(e)?.delete(s)}))}))}async retrieveDataFromService(e,t,r){const s=_.getInstance(),n=new Set,o=[];let a,p="",d=[];const m="relationship"===t.graphType,f=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,g=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let I=!f&&g?Array.from(g).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(I=e.objectIds);else if(null!=e.objectIds&&I&&I.length>0){const t=e.objectIds;e.objectIds=I.filter((e=>t.includes(e)))}else if(null!=e.objectIds)I=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=I}if(null!=e.outFields){const r=e.outFields;r.includes("*")?t.fields.forEach((e=>{n.add(e.name)})):r.forEach((e=>{e!==y.dr&&e!==t.geometryFieldName&&n.add(e)}))}if(null!=e.geometry){const r=e.geometry;let s;const d=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,y=d?.spatialReference,f=d?.serviceCapabilities?.geometryCapabilities;let g=f?.geometryMaxBoundingRectangleSizeX,_=f?.geometryMaxBoundingRectangleSizeY;if("point"===r.type){let e=r;e.spatialReference?.isWGS84||(await(0,h.initializeProjection)(e.spatialReference,c.KK),e=(0,h.project)(e,c.KK)),s=new T.A({spatialReference:c.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else r?.extent?.spatialReference&&!r.spatialReference?.isWGS84?(await(0,h.initializeProjection)(r.extent.spatialReference,c.KK),s=(0,h.project)(r.extent,c.KK)):s=r.extent;if(g&&_&&y){if(4326!==y.wkid){const e=new T.A({spatialReference:y,xmax:g,ymax:_}),t=(0,h.project)(e,c.KK);g=t.xmax,_=t.ymax}if(s.xmax-s.xmin>g)throw new i.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(s.ymax-s.ymin>_)throw new i.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${_}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const r=await(0,l.G)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&n.add(e.name)}))}p=m?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&n.add(t.geometryFieldName),n.forEach((e=>{p+=`, n.${e}`,o.push(e)})),a=new v.A({openCypherQuery:p,bindParameters:{param_filter_geom:new u.A({rings:(0,b.DX)(s)})}})}else{let r="";if(null!=e.where&&"1=1"!==e.where){const s=await(0,l.G)(e.where,t.fieldsIndex);t.fields.forEach((e=>{s.fieldNames.includes(e.name)&&n.add(e.name)}));const i=new Set(["column-reference","string","number","binary-expression"]),o=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const p=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`${p(e.left)} ${e.operator} ${p(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let r=e.right.value;"%"===r.charAt(0)&&(r=r.slice(1)),"%"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),t+=`'${r.toLowerCase()}')`}return t}return a=!0,""};r=p(s.parseTree),a&&(r="")}let s="";s=m?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let i=!1;I&&(i=!0,s+=" WHERE ID(n) IN $ids"),r&&(s+=i?" AND":" WHERE",s+=` ${r}`),s+=" return ID(n)",m&&(s+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&n.add(t.geometryFieldName),n.forEach((e=>{s+=`, n.${e}`,o.push(e)})),a=new v.A(I?{openCypherQuery:s,bindParameters:{ids:I}}:{openCypherQuery:s})}const M=(await(0,w.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,r)).resultRowsStream.getReader();for(;;){const{done:e,value:r}=await M.read();if(e)break;const n=[];for(let e=0;e<r.length;e++){const t=r[e];let s=0,i=0;const a={properties:{}};for(a.id=t[s],s++,i++,m&&(a.originId=t[s],s++,i++,a.destinationId=t[s],s++,i++);s<t.length;s++)a.properties[o[s-i]]=t[s];n.push(a)}d=d.concat(s.writeToStore(n,y.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return d}_isEndEntitySpatial(e,t,r){for(const s of e??[])if(this.entityTypeNames.has(s)){const e=this.geographicLookup.get(s),n=e&&this.sublayerCaches.get(s)?.get(t.attributes[r]);if(e&&n?.attributes[e.name])return!0}return!1}};(0,s._)([(0,p.MZ)()],M.prototype,"knowledgeGraph",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"inclusionModeDefinition",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"entityTypeNames",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"relationshipTypeNames",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"geographicLookup",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"sublayerCaches",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"nodeConnectionsLookup",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"relationshipConnectionsLookup",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"memberIdTypeLookup",void 0),M=(0,s._)([(0,d.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],M)},70643:(e,t,r)=>{r.d(t,{A:()=>V});var s=r(90237),n=(r(59456),r(13874)),i=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576),r(93618),r(65494)),o=r(15036),a=r(4718),l=r(92071),p=(r(29953),r(10107)),d=(r(44208),r(53966),r(40608)),u=r(43937),h=r(35666),c=r(57251),y=r(16930),m=r(21325),f=r(4146),g=r(83221),_=r(17970),b=r(64714);r(87811);const w=(0,r(17036).p)(),v=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,s._)([(0,p.MZ)(w.fields)],t.prototype,"fields",void 0),(0,s._)([(0,p.MZ)(w.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,s._)([(0,d.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};var I=r(85342),T=r(63074),M=r(87718),E=r(76294),A=r(32756),x=r(54310),k=r(25036),S=r(82935),C=r(10873),L=r(13213),N=r(20437),D=r(30524),R=r(81457),B=r(39383),O=r(96184),j=r(22671),P=r(61956),F=r(30291),q=r(61322),Z=r(5443),G=r(39829),$=r(82799),Q=r(86738),H=r(50498);function U(e){if(!e.json)return e;e.json.write=Y(e.json.write);const t=e.json.origins;if(!t)return e;let r;for(r in t){const e=t[r];e&&(e.write=Y(e.write))}return e}function Y(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:r,overridePolicy:s,...n}=e;return function(e,t){const r=z.call(this,e,t);return r.enabled?{...n,...r}:r}}(e)),e):!0===e?J():e}function J(){return{overridePolicy:z}}function z(e,t){const r=!!this.geometryType;let s={enabled:r};return r&&(s={...s,...W.call(this,e,t)}),s}function W(e,t){return{ignoreOrigin:this.originIdOf(t)>h.Gr.DEFAULTS}}let X=class extends(v((0,E.J)((0,M.F)((0,T.dM)((0,A.f)((0,S.e)((0,k.j)((0,x.J)((0,l.P)(f.A)))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=(0,b.f)(!1,!1),this.charts=null,this.definitionExpression=null,this.displayField="",this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.labelingInfo=null,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=I.dr,this.objectType=null,this.opacity=1,this.orderBy=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new q.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=P.A.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]}))},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach((t=>{const r="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(N.A.fromJSON({name:t.name,type:r,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))})),e.push(N.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),N.A.fromJSON({name:I.M1,type:"esriFieldTypeInteger",alias:I.M1,editable:!1}),N.A.fromJSON({name:I.BL,type:"esriFieldTypeInteger",alias:I.BL,editable:!1})),e}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?H.g.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return I.T1;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphTypeName(){return this.objectType?.name}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasZ??!1}set renderer(e){(0,D.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):"link-chart"===this.parentCompositeLayer?.type?"relationship"===this.graphType?(0,i.r)((0,b.F0)(H.g.toJSON("polyline")).renderer):(0,i.r)((0,b.F0)(H.g.toJSON("point")).renderer):(0,i.r)((0,b.F0)(H.g.toJSON(this.geometryType)).renderer)}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??y.A.WGS84}set timeInfo(e){(0,D.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return(0,F.tn)(this,e)}createQuery(){return new P.A({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];return null}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:r,queryEngine:s}=await this._setupQueryObjects(e),n=j.A.fromJSON(await s.executeQuery(r.toJSON(),t?.signal));return n.features.forEach((e=>{e.sourceLayer=this})),n}async queryFeaturesJSON(e,t){const{resolvedQuery:r,queryEngine:s}=await this._setupQueryObjects(e);return await s.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:r,queryEngine:s}=await this._setupQueryObjects(e);return s.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){const r={...e,returnGeometry:!0},{resolvedQuery:s,queryEngine:n}=await this._setupQueryObjects(r),i=await n.executeQueryForExtent(s.toJSON(),t?.signal);let o;return o=null!=i.extent?.xmin&&null!=i.extent?.xmax&&null!=i.extent?.ymin&&null!=i.extent?.ymax?new Z.A(i.extent):new Z.A,{count:i.count,extent:o}}async queryObjectIds(e,t){const r=P.A.from(e);let s;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)s=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);s=this.loadQueryEngine(e)}return s.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new g.A({geometryType:H.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new _.d({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:H.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new P.A({where:"1=1",outFields:[I.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const r=P.A.from(e),s=r.geometry;let n;if(s&&!s.spatialReference?.isWGS84&&(await(0,c.initializeProjection)(s.spatialReference,m.KK),r.geometry=(0,c.project)(s instanceof G.A||s instanceof $.A||s instanceof Q.A?s:s.extent,m.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)n=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);n=this.loadQueryEngine(e)}return{resolvedQuery:r,queryEngine:n}}};(0,s._)([(0,p.MZ)(U((0,a.o8)(T.sU)))],X.prototype,"blendMode",void 0),(0,s._)([(0,p.MZ)()],X.prototype,"capabilities",void 0),(0,s._)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:J()}})],X.prototype,"charts",void 0),(0,s._)([(0,p.MZ)({readOnly:!0})],X.prototype,"defaultPopupTemplate",null),(0,s._)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],X.prototype,"definitionExpression",void 0),(0,s._)([(0,p.MZ)()],X.prototype,"displayField",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(T.LF)))],X.prototype,"effect",void 0),(0,s._)([(0,p.MZ)()],X.prototype,"elevationInfo",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(M.Y)))],X.prototype,"featureEffect",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(L.d)))],X.prototype,"featureReduction",null),(0,s._)([(0,p.MZ)()],X.prototype,"fields",null),(0,s._)([(0,p.MZ)()],X.prototype,"geometryType",null),(0,s._)([(0,p.MZ)()],X.prototype,"geometryFieldName",null),(0,s._)([(0,p.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"graphType",void 0),(0,s._)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"graphTypeName",null),(0,s._)([(0,p.MZ)()],X.prototype,"hasM",null),(0,s._)([(0,p.MZ)()],X.prototype,"hasZ",null),(0,s._)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],X.prototype,"id",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(C.kF)))],X.prototype,"labelsVisible",void 0),(0,s._)([(0,p.MZ)({type:[R.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:B.w,write:J()}})],X.prototype,"labelingInfo",void 0),(0,s._)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],X.prototype,"layerType",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(C.fV)))],X.prototype,"legendEnabled",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(C.hG)))],X.prototype,"maxScale",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(C.hn)))],X.prototype,"minScale",void 0),(0,s._)([(0,p.MZ)()],X.prototype,"objectIdField",void 0),(0,s._)([(0,p.MZ)()],X.prototype,"objectType",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(C.ke)))],X.prototype,"opacity",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(A.n)))],X.prototype,"orderBy",void 0),(0,s._)([(0,p.MZ)()],X.prototype,"parentCompositeLayer",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(C.M6)))],X.prototype,"popupEnabled",void 0),(0,s._)([(0,p.MZ)({type:n.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],X.prototype,"popupTemplate",void 0),(0,s._)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:W}}})],X.prototype,"refreshInterval",void 0),(0,s._)([(0,p.MZ)({types:o.H,json:{name:"layerDefinition.drawingInfo.renderer",write:J()}})],X.prototype,"renderer",null),(0,s._)([(0,p.MZ)()],X.prototype,"source",void 0),(0,s._)([(0,p.MZ)()],X.prototype,"spatialReference",null),(0,s._)([(0,p.MZ)({type:O.A,json:{name:"layerDefinition.timeInfo",write:!0,origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:!0},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:!0}}}})],X.prototype,"timeInfo",null),(0,s._)([(0,p.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],X.prototype,"title",null),(0,s._)([(0,u.K)("title")],X.prototype,"writeTitle",null),(0,s._)([(0,p.MZ)({json:{read:!1}})],X.prototype,"type",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(S.B)))],X.prototype,"useViewTime",void 0),(0,s._)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:J()}})],X.prototype,"visible",void 0),X=(0,s._)([(0,d.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],X);const V=X},85342:(e,t,r)=>{r.d(t,{BL:()=>p,Cz:()=>i,KQ:()=>o,M1:()=>l,T1:()=>a,dr:()=>n,qN:()=>h});var s=r(71402);const n="ESRI__ID",i="ESRI__OriginID",o="ESRI__DestID",a="ESRI__LayoutGeometry",l="ESRI__AggregationCount",p="LC.ESRI__IsSpatial",d={initializeLayersFromClientData:async(e,t)=>{if(t||(t=[...e.layers,...e.tables].map((e=>e.graphTypeName))),0===t?.length)return;const r=new Map;for(const s of t)r.set(s,u(e,s));const n=await(0,s.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(r.values()));for(const t of[...e.layers,...e.tables]){const r=t.objectType.name;if(null===r)continue;const s=n.get(u(e,r));if(s){const e=JSON.parse(s);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}}},u=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function h(e,t){return d.initializeLayersFromClientData(e,t)}},45654:(e,t,r)=>{r.d(t,{DX:()=>_,_s:()=>w,aq:()=>b,fe:()=>v}),r(59456),r(52106);var s,n,i,o,a=r(78888),l=(r(61147),r(49186)),p=r(91869),d=(r(94194),r(90708),r(8460),r(71402)),u=r(42538);r(16930),(n=s||(s={})).ELEMENTUID="ELEMENTUID",n.TYPENAME="TYPENAME",s.ELEMENTUID,s.TYPENAME,function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME"}(i||(i={})),function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME",e[e.FROMUID=2]="FROMUID",e[e.TOUID=3]="TOUID"}(o||(o={}));var h,c,y,m,f,g=r(45724);function _(e){if(!e.spatialReference.isWGS84)throw new l.A("knowledge-graph:layer-support-utils","The extentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map((e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]))}async function b(e,t){const r=[],s=new Map,n=[];if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&s.set(e.name,[]);for(const t of e)s.has(t.typeName)&&s.get(t.typeName)?.push(t.id);for(const[e,i]of s){if(i.length<1)continue;const s=new u.A({openCypherQuery:`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $ids RETURN id(n), labels(n)[0], id(m), labels(m)[0]`,bindParameters:{ids:i}});n.push((0,d.executeQueryStreaming)(t,s).then((async e=>{const t=e.resultRowsStream.getReader();for(;;){const{done:e,value:s}=await t.read();if(e)break;for(const e of s)r.push({id:e[0],typeName:e[1]}),r.push({id:e[2],typeName:e[3]})}})))}return await Promise.all(n),r}async function w(e,t){t??=!1;const r={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e){const t=await(0,a.A)(e,{responseType:"array-buffer"}),r=await t.data;return async function(e){const t=new((await(0,g.I)()).MapOfObjectIdentifierSetsDecoder),r=t.decode(new Uint8Array(e)),s=new Map;if(0!==r.error_code)throw new l.A("knowledge-graph:layer-support-utils",r.error_message);const n=t.get_map_of_identifier_sets(),i=n.keys,o=i.size();for(let e=0;e<o;e++){const t=i.get(e),r=n.query_identifier_set(t),o=[];if(r.id_array_type.value===m.GLOBALID_ARRAY){const e=r.get_globalid_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_globalid_at(r))}else{if(r.id_array_type.value!==m.IDENTIFIER_ARRAY)throw new l.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=r.get_identifier_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_identifier_at(r).toString())}}s.set(t,o)}return t.delete(),s}(new Uint8Array(r))}(e).then((e=>{!function(e,t){for(const[r,s]of e){const e=(0,p.tE)(t.namedTypeDefinitions,r,(()=>({useAllData:!1,members:new Map})));for(const t of s)e.members.has(t)||e.members.set(t,{id:t})}}(e,r)})),r}async function v(e){const t=await(0,g.I)(),r=new t.MapOfObjectIdentifierSets;!function(e,t,r){for(const[s,n]of r.namedTypeDefinitions){if(!n.members||n.useAllData)continue;const r=n.members.keys(),i=new t.GlobalIdArray,o=new t.ObjectIdentifierSet;for(const e of r)i.add_globalid(e);o.set_globalid_array(i),i.delete(),e.put_identifier_set(s,o),o.delete()}}(r,t,e);const s=new t.MapOfObjectIdentifierSetsEncoder;try{s.set_map_of_identifier_sets(r),s.encode();const e=s.get_encoding_result();if(0!==e.error.error_code)throw new l.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return s.delete(),t}finally{r.delete()}}r(35448),(f=h||(h={}))[f.featureResult=0]="featureResult",f[f.countResult=1]="countResult",f[f.idsResult=2]="idsResult",function(e){e[e.upperLeft=0]="upperLeft",e[e.lowerLeft=1]="lowerLeft"}(c||(c={})),function(e){e[e.sqlTypeBigInt=0]="sqlTypeBigInt",e[e.sqlTypeBinary=1]="sqlTypeBinary",e[e.sqlTypeBit=2]="sqlTypeBit",e[e.sqlTypeChar=3]="sqlTypeChar",e[e.sqlTypeDate=4]="sqlTypeDate",e[e.sqlTypeDecimal=5]="sqlTypeDecimal",e[e.sqlTypeDouble=6]="sqlTypeDouble",e[e.sqlTypeFloat=7]="sqlTypeFloat",e[e.sqlTypeGeometry=8]="sqlTypeGeometry",e[e.sqlTypeGUID=9]="sqlTypeGUID",e[e.sqlTypeInteger=10]="sqlTypeInteger",e[e.sqlTypeLongNVarchar=11]="sqlTypeLongNVarchar",e[e.sqlTypeLongVarbinary=12]="sqlTypeLongVarbinary",e[e.sqlTypeLongVarchar=13]="sqlTypeLongVarchar",e[e.sqlTypeNChar=14]="sqlTypeNChar",e[e.sqlTypeNVarChar=15]="sqlTypeNVarChar",e[e.sqlTypeOther=16]="sqlTypeOther",e[e.sqlTypeReal=17]="sqlTypeReal",e[e.sqlTypeSmallInt=18]="sqlTypeSmallInt",e[e.sqlTypeSqlXml=19]="sqlTypeSqlXml",e[e.sqlTypeTime=20]="sqlTypeTime",e[e.sqlTypeTimestamp=21]="sqlTypeTimestamp",e[e.sqlTypeTimestamp2=22]="sqlTypeTimestamp2",e[e.sqlTypeTinyInt=23]="sqlTypeTinyInt",e[e.sqlTypeVarbinary=24]="sqlTypeVarbinary",e[e.sqlTypeVarchar=25]="sqlTypeVarchar"}(y||(y={})),function(e){e[e.OID_ARRAY=0]="OID_ARRAY",e[e.GLOBALID_ARRAY=1]="GLOBALID_ARRAY",e[e.STRING_ARRAY=2]="STRING_ARRAY",e[e.IDENTIFIER_ARRAY=3]="IDENTIFIER_ARRAY"}(m||(m={})),r(40863),r(82799),r(94985),r(39829),r(68249),r(86738)},32756:(e,t,r)=>{r.d(t,{f:()=>p,n:()=>l});var s=r(90237),n=r(93637),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);const l={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:function(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const n=new a.A;return n.read(s,r),[n]}},write:{writer:function(e,t,r,s){const i=e.find((e=>!!e.field));i&&(0,n.sM)(r,[i.toJSON()],t)}}}},p=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,i.MZ)(l)],t.prototype,"orderBy",void 0),t=(0,s._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},54310:(e,t,r)=>{r.d(t,{J:()=>b});var s=r(90237),n=(r(44208),r(53966)),i=r(74887),o=r(10107),a=r(79901),l=(r(87811),r(40608)),p=r(89317),d=r(5503),u=(r(60999),r(49186),r(14012),r(80559));const h=new d.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 m(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:m(t,e%t):0}let f=0,g=0;function _(){const e=Date.now();let t=!1;for(const r of h){const s=r.deref();s?s.refreshInterval&&e-(c.get(s)??0)+5>=6e4*s.refreshInterval&&(c.set(s,e),s.refresh(e)):t=!0}if(t)for(let e=h.length-1;e>=0;e--)h.at(e).deref()||h.removeAt(e)}(0,u.fm)((()=>{const e=Date.now();let t=0;for(const r of h){const s=r.deref();s&&(t=m(Math.round(6e4*s.refreshInterval),t),s.refreshInterval?c.get(s)||c.set(s,e):c.delete(s))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(_,g)}}));const b=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=>{n.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){}};return(0,s._)([(0,o.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.K}}}}})],t.prototype,"refreshInterval",void 0),(0,s._)([(0,a.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,s._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,s._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,s._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}},91880:(e,t,r)=>{r.d(t,{A:()=>u});var s,n=r(90237),i=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const p=new i.J({asc:"ascending",desc:"descending"});let d=s=class extends o.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],d.prototype,"valueExpression",void 0),(0,n._)([(0,a.MZ)({type:p.apiValues,json:{type:p.jsonValues,read:p.read,write:p.write}})],d.prototype,"order",void 0),d=s=(0,n._)([(0,l.$)("esri.layers.support.OrderByInfo")],d);const u=d},4071:(e,t,r)=>{r.d(t,{$:()=>s,P:()=>n});const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},8460:(e,t,r)=>{r.d(t,{$C:()=>m,Hh:()=>o,J:()=>l,Tu:()=>c,Wg:()=>y,Xq:()=>g,i6:()=>_,pM:()=>h,tx:()=>a,vJ:()=>f});var s=r(2741);let n,i=null;function o(){return n||(n=r.e(3666).then(r.bind(r,3666)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,s.s)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){i=e}(e)})),n)}var a,l,p,d,u,h,c,y,m,f,g,_,b,w;function v(e){const t=Object.keys(p).filter((e=>isNaN(parseInt(e,10)))).indexOf(e.timeDirection),r=Object.keys(d).filter((e=>isNaN(parseInt(e,10)))).indexOf(e.eventsTicksVisualization);return{timeDirection:{value:t>-1?t:p.right},timeBannerUTCOffsetInMinutes:e.timeBannerUTCOffsetInMinutes,eventsTicksVisualization:{value:r>-1?r:d.startAndEnd},showDurationLineForNonZeroDurationEntityEvents:e.showDurationLineForNonZeroDurationEntityEvents,durationLineWidth:e.durationLineWidth,entityPositionAtDurationRatio:e.entityPositionAtDurationRatio,showNonZeroDurationIntervalBounds:e.showNonZeroDurationIntervalBounds,separateTimeOverlaps:e.separateTimeOverlaps,separateTimelineOverlaps:e.separateTimelineOverlaps,moveFirstBends:e.moveFirstBends,secondBendRatio:e.secondBendRatio,lineSeparationMultiplier:e.lineSeparationMultiplier,spaceSeparatedLinesEvenly:e.spaceSeparatedLinesEvenly,useBezierCurves:e.useBezierCurves,separatedLineShapeRatio:e.separatedLineShapeRatio}}function I(e,t,r,s,n,o){const a=r.length,l=n.length,p=Float64Array.BYTES_PER_ELEMENT,d=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,h=16+a*(u+2*p)+l*(2*d),c=i._malloc(h);try{const u=c+16-c%16,h=u+a*p,y=h+a*p,m=y+l*d,f=m+l*d,g=()=>[i.HEAPF64.subarray(u>>3,(u>>3)+a),i.HEAPF64.subarray(h>>3,(h>>3)+a),i.HEAPU32.subarray(y>>2,(y>>2)+l),i.HEAPU32.subarray(m>>2,(m>>2)+l),i.HEAPU8.subarray(f,f+a)],[_,b,w,v,I]=g();_.set(r),b.set(s),w.set(n),v.set(o),I.set(t);let T=e(a,f,u,h,l,y,m),M=null,E=null;if(T){const e=i.getLayoutLinksTypes(),t=i.getLayoutLinksVerticesEndIndices(),r=i.getLayoutLinksVertices(),s=i.countLayoutLinksVertices();!l||e&&t?s&&!r?T=!1:(M={types:new Uint8Array(i.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(i.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(i.HEAPF64.subarray(r>>3,(r>>3)+2*s))},E=i.getAuxiliaryGraphicElements()):T=!1}const[A,x,k,S,C]=g();return r.set(A),s.set(x),n.set(k),o.set(S),t.set(C),{success:T,links:M,graphics:E}}finally{i._free(c),i.cleanupLayout()}}(u=a||(a={}))[u.None=0]="None",u[u.IsMovable=1]="IsMovable",u[u.IsGeographic=2]="IsGeographic",u[u.IsRoot=4]="IsRoot",u[u.IsOld=8]="IsOld",function(e){e[e.Regular=0]="Regular",e[e.Curved=1]="Curved",e[e.Recursive=2]="Recursive"}(l||(l={})),function(e){e[e.right=0]="right",e[e.left=1]="left",e[e.up=2]="up",e[e.down=3]="down"}(p||(p={})),function(e){e[e.none=0]="none",e[e.startOnly=1]="startOnly",e[e.startAndEnd=2]="startAndEnd"}(d||(d={})),function(e){e.getMinIdealEdgeLength=function(){return i.getMinIdealEdgeLength()},e.apply=function(e,t,r,s,n,o=2,a=1,l=-1){return I(((e,t,r,s,n,p,d)=>i.applyForceDirectedLayout(e,t,r,s,n,p,d,o,a,l)),e,t,r,s,n)}}(h||(h={})),function(e){e.apply=function(e,t,r,s,n,o=2,a=1,l=-1){return I(((e,t,r,s,n,p,d)=>i.applyCommunityLayout(e,t,r,s,n,p,d,o,a,l)),e,t,r,s,n)}}(c||(c={})),function(e){e.apply=function(e,t,r,s,n){return I(i.applySimpleLayout,e,t,r,s,n)}}(y||(y={})),function(e){e.apply=function(e,t,r,s,n){return I(i.applyHierarchicalLayout,e,t,r,s,n)}}(m||(m={})),function(e){e.apply=function(e,t,r,s,n){return I(i.applyRadialTreeLayout,e,t,r,s,n)}}(f||(f={})),function(e){e.apply=function(e,t,r,s,n){return I(i.applySmartTreeLayout,e,t,r,s,n)}}(g||(g={})),function(e){e.apply=function(e,t,r,s,n,o,a,l,u,h,c){const y={timeDirection:p.right,timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:d.startAndEnd,showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0};return I(((e,t,r,o,a,p,d)=>{if(s.length!==e)return!1;if(n.length!==e)return!1;if(l.length!==a)return!1;if(u.length!==a)return!1;const m=Float64Array.BYTES_PER_ELEMENT,f=16,g=i._malloc(f+e*m),_=i._malloc(f+e*m),b=i._malloc(f+a*m),w=i._malloc(f+a*m),I=g+f-g%f,T=_+f-_%f,M=b+f-b%f,E=w+f-w%f;try{i.HEAPF64.subarray(I>>3,(I>>3)+e).set(s),i.HEAPF64.subarray(T>>3,(T>>3)+e).set(n),i.HEAPF64.subarray(M>>3,(M>>3)+a).set(l),i.HEAPF64.subarray(E>>3,(E>>3)+a).set(u);const m=v(Object.assign(y,c));return i.applyChronologicalLayout(e,t,r,o,I,T,a,p,d,M,E,h,m)}finally{i._free(g),i._free(_),i._free(b),i._free(w)}}),e,t,r,o,a)}}(_||(_={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(b||(b={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(w||(w={}))},25927:(e,t,r)=>{r.d(t,{A:()=>p});var s=r(90237),n=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),o=r(54238),a=r(86738);let l=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,s._)([(0,n.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.Entity")],l);const p=l},54238:(e,t,r)=>{r.d(t,{A:()=>l});var s=r(90237),n=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),o=r(77901);let a=class extends o.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.GraphNamedObject")],a);const l=a},77901:(e,t,r)=>{r.d(t,{A:()=>l});var s=r(90237),n=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends n.oY{constructor(e){super(e),this.properties=null}};(0,s._)([(0,i.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,s._)([(0,o.$)("esri.rest.knowledgeGraph.GraphObject")],a);const l=a},42538:(e,t,r)=>{r.d(t,{A:()=>d});var s=r(90237),n=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),o=r(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,s._)([(0,n.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQuery")],a);const l=a;let p=class extends l{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,s._)([(0,n.MZ)()],p.prototype,"bindParameters",void 0),(0,s._)([(0,n.MZ)()],p.prototype,"bindGeometryQuantizationParameters",void 0),(0,s._)([(0,n.MZ)()],p.prototype,"outputQuantizationParameters",void 0),(0,s._)([(0,n.MZ)()],p.prototype,"outputSpatialReference",void 0),(0,s._)([(0,n.MZ)()],p.prototype,"provenanceBehavior",void 0),p=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],p);const d=p},40662:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(90237),n=(r(53966),r(44208),r(87811),r(49186),r(40608)),i=r(77901);let o=class extends i.A{constructor(e){super(e)}};o=(0,s._)([(0,n.$)("esri.rest.knowledgeGraph.ObjectValue")],o);const a=o},42095:(e,t,r)=>{r.d(t,{A:()=>p});var s=r(90237),n=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(77901);let l=class extends n.oY{constructor(e){super(e),this.path=null}};(0,s._)([(0,i.MZ)({type:[a.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,s._)([(0,o.$)("esri.rest.knowledgeGraph.Path")],l);const p=l},23150:(e,t,r)=>{r.d(t,{A:()=>p});var s=r(90237),n=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),o=r(54238),a=r(82799);let l=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,s._)([(0,n.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.Relationship")],l);const p=l}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8692,3069],{13069:(e,t,i)=>{i.d(t,{lk:()=>a,vD:()=>n,yS:()=>s});const r="randomUUID"in crypto;function a(){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 s(){return`{${a().toUpperCase()}}`}function n(){return`{${a()}}`}},28692:(e,t,i)=>{i.r(t),i.d(t,{default:()=>O});var r=i(90237),a=i(5503),s=i(49186),n=i(53966),o=i(91869),l=i(92071),p=i(74887),d=i(84952),y=i(13069),c=i(10107),h=(i(44208),i(87811),i(36005)),u=i(40608),g=i(43937),m=i(35666),f=i(4146),w=i(61184),S=i(70643),b=i(85342),L=i(45654),M=i(18768),v=i(63074),I=i(69208),T=i(16131),_=i(8303),A=i(54310),G=i(25036),E=i(10873),D=i(71402),P=i(97159);let C=class extends((0,v.dM)((0,G.j)((0,A.J)((0,M.b)((0,T.q)((0,_.A)((0,l.P)((0,I.d)(f.A))))))))){constructor(e){super(e),this._graphTypeLookup=new Map,this._namedTypesModified=!1,this.dataManager=null,this.definitionSetMap=null,this.knowledgeGraph=null,this.layers=new(a.A.ofType(S.A)),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="KnowledgeGraphLayer",this.sublayerIdsCache=new Map,this.tables=new(a.A.ofType(S.A)),this.type="knowledge-graph",this.url=null}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){try{await this.loadFromPortal({supportedTypes:["Knowledge Graph Layer"]},e)}catch(e){(0,p.QP)(e)}await this._fetchMetadata(),await this._initializeLayerProperties(),this.loadLayerAssumingLocalCache(),await(0,b.qN)(this)}async _fetchMetadata(){if(!this.url)throw new s.A("knowledge-graph:missing-url","KnowledgeGraphLayer must be created with a url");const e=await(0,D.fetchKnowledgeGraph)(this.url);this.knowledgeGraph=e,this._forEachGraphType((e=>{e.name&&this._graphTypeLookup.set(e.name,e)}))}async _initializeLayerProperties(){this.originIdOf("inclusionModeDefinition")===m.Gr.USER?this._validateInclusionModeDefinition():await this._initializeInclusionModeDefinition(),this._setMemberTypes(),this.dataManager=new w.P({knowledgeGraph:this.knowledgeGraph,inclusionModeDefinition:this.inclusionModeDefinition})}async _initializeInclusionModeDefinition(){const e=this.definitionSetMap?await(0,L._s)(this.definitionSetMap,!0):{generateAllSublayers:!0,namedTypeDefinitions:new Map};[...this.layers.toArray(),...this.tables.toArray()].forEach((t=>{const i=this._graphTypeLookup.get(t.graphTypeName);i&&!e.namedTypeDefinitions.has(i.name)&&e.namedTypeDefinitions.set(i.name,{useAllData:!0})})),this.setAtOrigin("inclusionModeDefinition",e,(0,m.OL)(this.originIdOf("definitionSetMap")))}_validateInclusionModeDefinition(){const{inclusionModeDefinition:e}=this;if(!e)return;const{namedTypeDefinitions:t}=e;if(t?.size>0)t.forEach(((e,i)=>{const r=this._graphTypeLookup.get(i);if(!r)return n.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void t.delete(i);"relationship"!==r.type&&"entity"!==r.type&&(n.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't properly modeled and will be removed`),t.delete(i))}));else if(!e.generateAllSublayers)throw new s.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined")}_setMemberTypes(){let e=[],t=[];const{inclusionModeDefinition:i}=this,r=i?.namedTypeDefinitions;!i||i.generateAllSublayers?(e=this.knowledgeGraph.dataModel?.entityTypes??[],t=this.knowledgeGraph.dataModel?.relationshipTypes??[]):r&&r.size>0&&r.forEach(((i,r)=>{const a=this._graphTypeLookup.get(r);switch(a?.type){case"relationship":t.push(a);break;case"entity":e.push(a)}})),this.memberEntityTypes=e,this.memberRelationshipTypes=t}_forEachGraphType(e){[...this.knowledgeGraph.dataModel?.entityTypes??[],...this.knowledgeGraph.dataModel?.relationshipTypes??[]].forEach((t=>{e(t)}))}_refreshNamedTypes(){this._namedTypesModified=!0;for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}async _handleNewRecords(e){const t=[];this.dataManager.addToLayer(e);for(const i of e)this.sublayerIdsCache.has(i.typeName)||(this.sublayerIdsCache.set(i.typeName,new Set),t.push(i.typeName)),this.sublayerIdsCache.get(i.typeName).add(i.id);for(const e of t){const t=this._graphTypeLookup.get(e);t&&(this._addSublayer(t),"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),this.dataManager.sublayerCaches.set(e,new Map))}await(0,b.qN)(this,t),this._refreshNamedTypes()}_createSublayers(e,t,i){e.forEach((e=>{const r=this._createSublayer(e);i(r)&&t.push(r),this._updateSublayerCaches(e)}))}_addSublayer(e){const t=this._createSublayer(e);return t.geometryType?this.layers.push(t):this.tables.push(t),t}_createSublayer(e){return new S.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const i=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));i&&(t.objectType=i,this._updateSublayerCaches(i))}))}_updateSublayerCaches(e){const t=this.dataManager.sublayerCaches;t.has(e.name)||t.set(e.name,new Map)}_saveUrlAsNewResource(e,t,i,r){e[t]="<pending>",i.pendingOperations.push(async function(e){const t=await(0,L.fe)(e);return new Blob([t],{type:"application/x-protobuf"})}(this.inclusionModeDefinition).then((a=>{const s=function(e){const t=`definitionSetMap-${(0,y.lk)()}.dat`,i=(0,d.fj)("knowledgeGraphLayer",t);return e.resourceFromPath(i)}(r);e[t]=s.itemRelativeUrl,i.toAdd.push({resource:s,content:{type:"blob",blob:a},compress:!1,finish:e=>{this.definitionSetMap=e.url}})})))}_displaysAllRecords(e){for(const[,{useAllData:t}]of e.namedTypeDefinitions)if(!t)return!1;return!0}readDefinitionSetMap(e,t,i){return(0,P.f)(e,i)}writeDefinitionSetMap(e,t,i,r){const a=r?.portalItem,s=r?.resources,n=(0,m.aB)(r?.origin);if(!a||!s||null==n)return void(e&&(t[i]=(0,P.t)(e,r)));const{inclusionModeDefinition:o}=this;if(!o||this._displaysAllRecords(o))return void(this.definitionSetMap=null);const l=this.originIdOf("inclusionModeDefinition");if(l===m.Gr.USER||this._namedTypesModified||n<l)this._saveUrlAsNewResource(t,i,s,a);else if(n===l&&e){const n=(0,P.t)(e,r);(0,d.oP)(n)?this._saveUrlAsNewResource(t,i,s,a):t[i]=n}}set inclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("inclusionModeDefinition",e):n.A.getLogger(this).error("#inclusionModeDefinition","inclusionModeDefinition cannot be changed after the layer is loaded.")}loadLayerAssumingLocalCache(){const e=[...this.memberEntityTypes,...this.memberRelationshipTypes];this.originIdOf("layers")===m.Gr.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===m.Gr.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const i=(0,o.tE)(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((e=>{i.add(e.id)}))}))}async addRecords(e){await this._handleNewRecords(e)}async removeRecords(e){const t=[];for(const i of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.members?.has(i.id)&&t.push(i);this.dataManager.removeFromLayer(t);for(const e of t)this.sublayerIdsCache.get(e.typeName)?.delete(e.id);return this._refreshNamedTypes(),t}};(0,r._)([(0,c.MZ)()],C.prototype,"dataManager",void 0),(0,r._)([(0,c.MZ)({json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],C.prototype,"definitionSetMap",void 0),(0,r._)([(0,h.w)("definitionSetMap")],C.prototype,"readDefinitionSetMap",null),(0,r._)([(0,g.K)("definitionSetMap")],C.prototype,"writeDefinitionSetMap",null),(0,r._)([(0,c.MZ)()],C.prototype,"inclusionModeDefinition",null),(0,r._)([(0,c.MZ)()],C.prototype,"knowledgeGraph",void 0),(0,r._)([(0,c.MZ)({type:a.A.ofType(S.A),json:{write:{ignoreOrigin:!0}}})],C.prototype,"layers",void 0),(0,r._)([(0,c.MZ)()],C.prototype,"memberEntityTypes",void 0),(0,r._)([(0,c.MZ)()],C.prototype,"memberRelationshipTypes",void 0),(0,r._)([(0,c.MZ)({type:["KnowledgeGraphLayer"]})],C.prototype,"operationalLayerType",void 0),(0,r._)([(0,c.MZ)()],C.prototype,"sublayerIdsCache",void 0),(0,r._)([(0,c.MZ)({type:a.A.ofType(S.A),json:{write:{ignoreOrigin:!0}}})],C.prototype,"tables",void 0),(0,r._)([(0,c.MZ)({json:{read:!1}})],C.prototype,"type",void 0),(0,r._)([(0,c.MZ)(E.OZ)],C.prototype,"url",void 0),C=(0,r._)([(0,u.$)("esri.layers.KnowledgeGraphLayer")],C);const O=C},18768:(e,t,i)=>{i.d(t,{b:()=>l});var r=i(90237),a=i(53966),s=i(10107),n=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,a.A.getLogger(this)))}};return(0,r._)([(0,s.MZ)()],t.prototype,"title",null),(0,r._)([(0,s.MZ)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,n.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,i)=>{i.d(t,{d:()=>n});var r=i(90237),a=i(10107),s=(i(44208),i(53966),i(87811),i(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,r._)([(0,a.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,r._)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},16131:(e,t,i)=>{i.d(t,{q:()=>b});var r=i(90237),a=i(49186),s=i(84952),n=i(10107),o=i(56507),l=(i(87811),i(44208),i(36005)),p=i(40608),d=i(43937),y=i(89317),c=i(45917),h=i(49422);const u={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},g={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},m={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},f={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":u,"web-map/basemap":g,"web-map/tables":m,"link-chart/operational-layers":{...u,LinkChartLayer:!0},"link-chart/basemap":g,"link-chart/tables":m,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var w=i(10873),S=i(79677);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,i){return"Group Layer"===i?.portalItem?.type?void 0:e}writeListMode(e,t,i,r){(r&&"ground"===r.layerContainerType||e&&(0,h.R)(this,i,{},r))&&(t[i]=e)}writeOperationalLayerType(e,t,i,r){e&&"tables"!==r?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?S.A.fromArray(e):null}writeTimeExtent(e,t,i,r){e&&"tables"!==r.layerContainerType&&(e.isEmpty?r?.messages&&r.messages.push(new a.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[i]=e.toArray())}read(e,t){t&&(t.layer=this),(0,c.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,i=f[e];let r=!!i?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(r=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(r=!1),!r)return t.messages?.push(new a.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const i=super.write(e,{...t,layer:this}),r=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof a.A&&"web-document-write:property-required"===e.name)).length;return(0,s.w8)(i?.url)?(t?.messages?.push(new a.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&r?null:i}beforeSave(){}};return(0,r._)([(0,n.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,r._)([(0,l.w)("id",["id"])],t.prototype,"readId",null),(0,r._)([(0,n.MZ)(w.C1)],t.prototype,"listMode",void 0),(0,r._)([(0,d.K)("listMode")],t.prototype,"writeListMode",null),(0,r._)([(0,n.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:y.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,r._)([(0,n.MZ)(w.ke)],t.prototype,"opacity",void 0),(0,r._)([(0,n.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,r._)([(0,n.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,r._)([(0,d.K)("title"),(0,d.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,r._)([(0,n.MZ)({type:S.A,json:{origins:{"web-scene":{write:{layerContainerTypes:y.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,l.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,r._)([(0,d.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[o.jz,o.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,r._)([(0,n.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:y.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,r._)([(0,p.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,i)=>{i.d(t,{A:()=>M});var r=i(90237),a=i(92602),s=i(70333),n=i(78888),o=i(60999),l=i(49186),p=i(53966),d=i(97768),y=i(74887),c=i(84952),h=i(10107),u=(i(44208),i(87811),i(36005)),g=i(40608),m=i(43937),f=i(83531),w=i(20655),S=i(80812),b=i(41318),L=i(10407);const M=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,d.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new S.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([i.e(5356),i.e(1204)]).then(i.bind(i,41204));return(0,y.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,y.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,y.QP)(e),!0))))}async setUserPrivileges(e,t){if(!a.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:a}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",a)}catch(e){(0,y.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,L.It)(i);let a,n;if(r)a=i.portal.url;else try{a=await(0,f.wI)(this.url,t)}catch(e){(0,y.QP)(e)}if(!a||!(0,c.b8)(a,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(s.id?.getCredential(`${a}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,y.QP)(e)}const o=!0,l=!1,p=!1;if(!n)return{features:{edit:o,fullEdit:l},content:{updateItem:p}};try{if(r?await i.reload():(i=new S.default({id:e,portal:{url:a}}),await i.load(t)),i.portal.user)return(0,L.It)(i)}catch(e){(0,y.QP)(e)}return{features:{edit:o,fullEdit:l},content:{updateItem:p}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,y.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=v.credential===t?v.user:await this._fetchEditingUser(e);return v.credential=t,v.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,a=w.A.getDefault();if(a&&a.loaded&&(0,c.S8)(a.restUrl)===(0,c.S8)(r))return a.user;const l=`${r}/community/self`,p=null!=e?e.signal:null,d=await(0,o.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:p}));return d.ok?b.A.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||w.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,h.MZ)({type:S.default})],t.prototype,"portalItem",null),(0,r._)([(0,u.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,h.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,g.$)("esri.layers.mixins.PortalLayer")],t),t},v={credential:null,user:null}}}]);
|