@arcgis/core 4.30.0-next.20240413 → 4.30.0-next.20240416

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/analysis/ViewshedShape.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/13be2bb9df1da255b8b1.js +1 -0
  4. package/assets/esri/core/workers/chunks/22c0adc7f8b3c8bc6d35.js +1 -0
  5. package/assets/esri/core/workers/chunks/2953c39aca5b516bc5f6.js +1 -0
  6. package/assets/esri/core/workers/chunks/2cf7354212aa1f3d5943.js +1 -0
  7. package/assets/esri/core/workers/chunks/47d5df8993de8c750391.js +1 -0
  8. package/assets/esri/core/workers/chunks/4aa78eb71520c0f9100e.js +1 -0
  9. package/assets/esri/core/workers/chunks/51c3f31a99c42a9b2f44.js +1 -0
  10. package/assets/esri/core/workers/chunks/5755dd8040aaf9a5ab47.js +1 -0
  11. package/assets/esri/core/workers/chunks/{fd5655136f7441731ae8.js → 61e4a0d5066a26cccb06.js} +1 -1
  12. package/assets/esri/core/workers/chunks/80efe9792d2ba77bd664.js +1 -0
  13. package/assets/esri/core/workers/chunks/81b085cb2221c74ed79a.js +1 -0
  14. package/assets/esri/core/workers/chunks/{c32a63b72950495d66e8.js → 81d521bf688e8c2bf85e.js} +1 -1
  15. package/assets/esri/core/workers/chunks/85741d70108fc20b8be9.js +1 -0
  16. package/assets/esri/core/workers/chunks/875241c2c449d33ce22c.js +1 -0
  17. package/assets/esri/core/workers/chunks/8efe15f1806fca7c5f71.js +1 -0
  18. package/assets/esri/core/workers/chunks/{4f854e0e3a65b768f6be.js → 94d457c64672a5a0745f.js} +1 -1
  19. package/assets/esri/core/workers/chunks/96d0b2df01995d6a2ed7.js +1 -0
  20. package/assets/esri/core/workers/chunks/{9c0e1e7c4296a5d032a0.js → 9bca278407528b0a82d5.js} +1 -1
  21. package/assets/esri/core/workers/chunks/9bdd6ea47ed79b223805.js +1 -0
  22. package/assets/esri/core/workers/chunks/{15c20dc5a41b63547214.js → a4919febf9c292813f67.js} +1 -1
  23. package/assets/esri/core/workers/chunks/a5cf29f344e6898e6e42.js +1 -0
  24. package/assets/esri/core/workers/chunks/{d1afd6eebab25df19cfa.js → b1a24e9e29bb82bae138.js} +1 -1
  25. package/assets/esri/core/workers/chunks/b969db5bada427ff250e.js +1 -0
  26. package/assets/esri/core/workers/chunks/baef47302b7f1a4efa19.js +1 -0
  27. package/assets/esri/core/workers/chunks/bd4f8bb7aa6b1dc72545.js +1 -0
  28. package/assets/esri/core/workers/chunks/{796206ad634adea02eec.js → c6c5e833a044f1969b00.js} +1 -1
  29. package/assets/esri/core/workers/chunks/c7df774880d362f7b6b1.js +1 -0
  30. package/assets/esri/core/workers/chunks/c9e98bd7cd5ec5a84625.js +1 -0
  31. package/assets/esri/core/workers/chunks/cc43a08272db89b3e585.js +1 -0
  32. package/assets/esri/core/workers/chunks/d2acf1dc4edec8c6f0f2.js +1 -0
  33. package/assets/esri/core/workers/chunks/d626260dcce5d6a7e0e9.js +1 -0
  34. package/assets/esri/core/workers/chunks/e42fe688b21933320017.js +1 -0
  35. package/assets/esri/core/workers/chunks/e88df6df4ddc2f653dfe.js +1 -0
  36. package/assets/esri/core/workers/chunks/{fdc22a127011833699d2.js → f5c5305de5d805202b41.js} +1 -1
  37. package/assets/esri/core/workers/chunks/f92d76b694ff0cdb212c.js +1 -0
  38. package/assets/esri/core/workers/chunks/fcddae07a8348d17b57a.js +1 -0
  39. package/assets/esri/core/workers/chunks/ff845570ff398cb8a187.js +1 -0
  40. package/assets/esri/themes/base/widgets/_Tooltip.scss +22 -12
  41. package/assets/esri/themes/dark/main.css +1 -1
  42. package/assets/esri/themes/light/main.css +1 -1
  43. package/assets/esri/themes/light/view.css +1 -1
  44. package/interfaces.d.ts +57 -9
  45. package/layers/CatalogLayer.js +1 -1
  46. package/layers/FeatureLayer.js +1 -1
  47. package/layers/catalog/CatalogFootprintLayer.js +1 -1
  48. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  49. package/layers/support/Sublayer.js +1 -1
  50. package/layers/support/featureLayerUtils.js +1 -1
  51. package/layers/support/layerUtils.js +1 -1
  52. package/package.json +1 -1
  53. package/rest/featureService/FeatureService.js +1 -1
  54. package/support/revision.js +1 -1
  55. package/symbols/cim/utils.js +1 -1
  56. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  57. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  58. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  59. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  60. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  61. package/widgets/FeatureTable/Grid/Column.js +1 -1
  62. package/widgets/FeatureTable.js +1 -1
  63. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  64. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  65. package/widgets/UtilityNetworkTrace/support/GraphicHandler.js +1 -1
  66. package/widgets/UtilityNetworkTrace.js +1 -1
  67. package/assets/esri/core/workers/chunks/01d778f05b27195289f6.js +0 -1
  68. package/assets/esri/core/workers/chunks/20e81d5bfd6b7c720789.js +0 -1
  69. package/assets/esri/core/workers/chunks/2659f6ea7010b632df53.js +0 -1
  70. package/assets/esri/core/workers/chunks/361819e305105502926e.js +0 -1
  71. package/assets/esri/core/workers/chunks/3d614c39d2a13fb305fe.js +0 -1
  72. package/assets/esri/core/workers/chunks/3d905e1c69bc302448c5.js +0 -1
  73. package/assets/esri/core/workers/chunks/45b2f6334c001651b8ff.js +0 -1
  74. package/assets/esri/core/workers/chunks/5283aabc9f9ff9a3866a.js +0 -1
  75. package/assets/esri/core/workers/chunks/5f40ed1ff37670b47bb6.js +0 -1
  76. package/assets/esri/core/workers/chunks/636627deab56dd8a9da1.js +0 -1
  77. package/assets/esri/core/workers/chunks/672fffea5257e96120e0.js +0 -1
  78. package/assets/esri/core/workers/chunks/7c8252831ff88e64e3c7.js +0 -1
  79. package/assets/esri/core/workers/chunks/888fe0bf8c86564a1da6.js +0 -1
  80. package/assets/esri/core/workers/chunks/8c0d5c4f669af3663052.js +0 -1
  81. package/assets/esri/core/workers/chunks/92dfa2973977075a2701.js +0 -1
  82. package/assets/esri/core/workers/chunks/9ea8016ee6fa5977980c.js +0 -1
  83. package/assets/esri/core/workers/chunks/ac9d1e33a0da083c3e54.js +0 -1
  84. package/assets/esri/core/workers/chunks/ae43948a50f6bfeee2e3.js +0 -1
  85. package/assets/esri/core/workers/chunks/aee1580da7009a3cadda.js +0 -1
  86. package/assets/esri/core/workers/chunks/c065148c33f58871b542.js +0 -1
  87. package/assets/esri/core/workers/chunks/c1595b336f53c0e362f1.js +0 -1
  88. package/assets/esri/core/workers/chunks/c26720584a6f5b05474e.js +0 -1
  89. package/assets/esri/core/workers/chunks/d0cf48abf951ae58ab15.js +0 -1
  90. package/assets/esri/core/workers/chunks/d56297ebd21ff95ced40.js +0 -1
  91. package/assets/esri/core/workers/chunks/e2cdf963cf09f70d9bfd.js +0 -1
  92. package/assets/esri/core/workers/chunks/e79a75f40b8231179402.js +0 -1
  93. package/assets/esri/core/workers/chunks/ee18e753d4db6f4266ae.js +0 -1
  94. package/assets/esri/core/workers/chunks/ef5db5c3be1dba954d74.js +0 -1
  95. package/assets/esri/core/workers/chunks/fd137b51bc3517b5bdb6.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8228],{70668:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),n=r(69540),s=r(25482),o=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),d=r(73133);let p=class extends((0,n.O)(s.oY)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,a.e)(d.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,i._)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,i._)([(0,u.$)("esri.TimeInterval")],p);const c=p},92071:(e,t,r)=>{r.d(t,{P:()=>w,L:()=>S});var i=r(90237),n=r(69622),s=r(76953),o=r(4718),l=r(35666);class a{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(l.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new a,r=this._originStores[l.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,o.o8)(e),l.Gr.DEFAULTS)}));for(let r=l.Gr.SERVICE;r<l.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,n)=>{e&&e.has(n)||t.set(n,(0,o.o8)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=l.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=l.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),n=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),n!==i}originOf(e){return this._propertyOriginMap.get(e)||l.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var u=r(45917),d=r(88620),p=r(40608);const c=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,d.oY)(this),r=t.store,i=new a;t.store=i,(0,s.k)(t,r,i)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const r=y(this),i=(0,l.aB)(t);if("string"==typeof e)return r.get(e,i);const n={};return e.forEach((e=>{n[e]=r.get(e,i)})),n}originOf(e){return(0,l.OL)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,t){const r=y(this),i=(0,l.aB)(t),n=(0,d.oY)(this);let s;s="string"==typeof e?"*"===e?r.keys(i):[e]:e,s.forEach((e=>{n.invalidate(e),r.revert(e,i),n.commit(e)}))}};return t=(0,i._)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function y(e){return(0,d.oY)(e).store}let h=class extends(c(n.A)){};h=(0,i._)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],h);var m=r(16649),f=r(49422);const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,l.aB)(t))}write(e,t){return(0,f.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,d.oY)(this).setAtOrigin(e,t,(0,l.aB)(r))}removeOrigin(e){const t=v(this),r=(0,l.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),l.Gr.USER)}updateOrigin(e,t){const r=v(this),i=(0,l.aB)(t),n=(0,m.Jt)(this,e);for(let t=i+1;t<l.AU;++t)r.delete(e,t);r.set(e,n,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,d.oY)(e).store}const w=e=>{let t=class extends(g(c(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport")],t),t};let S=class extends(w(n.A)){};S=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport")],S)},39516:(e,t,r)=>{async function i(e,t){const{WhereClause:i}=await Promise.all([r.e(835),r.e(4800)]).then(r.bind(r,50835));return i.create(e,t)}function n(e,t){return"1=1"===e?t:"1=1"===t?e:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>i,m:()=>n})},3330:(e,t,r)=>{r.d(t,{GB:()=>n,Qo:()=>o,Y4:()=>s});var i=r(96285);class n{}function s(e){return e instanceof i.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return s(e)?n.instance:e}n.instance=new i.oh("Etc/UTC")},70328:(e,t,r)=>{r.d(t,{BI:()=>f,Ej:()=>d,Hq:()=>u,Ie:()=>h,Jt:()=>m,Ne:()=>p,RF:()=>l,aI:()=>v,fA:()=>s,hZ:()=>y,iT:()=>a,is:()=>g,qv:()=>w,vI:()=>c,v_:()=>S,vt:()=>n,w1:()=>o});var i=r(5443);function n(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,s,o,l=n()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=s,l[5]=o,l}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],o=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=l,e[4]=a,e[5]=u}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function p(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function c(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?y(e,w):n(w)}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function f(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function v(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];n()},60683:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Q});var i,n=r(90237),s=(r(59456),r(13874)),o=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576),r(93618),r(65494)),l=r(15036),a=r(78888),u=r(69540),d=r(49186),p=r(36563),c=r(4718),y=r(53966),h=r(92071),m=r(74887),f=r(10107),g=r(56507),v=r(36005),w=r(40608),S=r(50498),_=r(4146),b=r(18768),I=r(63074),M=r(69208),T=r(87718),x=r(81149),A=r(16131),L=r(8303),F=r(54310),O=r(25036),E=r(82935),Z=r(10873),R=r(15426),N=r(20437),j=r(17036),P=r(30524),G=r(81457),U=r(39383),$=r(25482);r(44208),r(87811);let D=i=class extends $.oY{constructor(){super(...arguments),this.age=null,this.ageReceived=null,this.displayCount=null,this.maxObservations=1}clone(){return new i({age:this.age,ageReceived:this.ageReceived,displayCount:this.displayCount,maxObservations:this.maxObservations})}};(0,n._)([(0,f.MZ)({type:Number,json:{write:!0}})],D.prototype,"age",void 0),(0,n._)([(0,f.MZ)({type:Number,json:{write:!0}})],D.prototype,"ageReceived",void 0),(0,n._)([(0,f.MZ)({type:Number,json:{write:!0}})],D.prototype,"displayCount",void 0),(0,n._)([(0,f.MZ)({type:Number,json:{write:!0}})],D.prototype,"maxObservations",void 0),D=i=(0,n._)([(0,w.$)("esri.layers.support.PurgeOptions")],D);const V=D;var C=r(8947),k=r(61956),J=r(30291),B=r(88625),z=r(92935),H=r(16930),W=r(5443);const q=(0,j.p)();function Y(e,t){return new d.A("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}let K=class extends((0,x.J)((0,T.F)((0,I.d)((0,E.e)((0,O.j)((0,F.J)((0,b.b)((0,A.q)((0,L.A)((0,h.P)((0,M.d)((0,u.O)(_.A))))))))))))){constructor(...e){super(...e),this.copyright=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.geometryDefinition=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.maxReconnectionAttempts=0,this.maxReconnectionInterval=20,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.operationalLayerType="ArcGISStreamLayer",this.outFields=["*"],this.popupEnabled=!0,this.popupTemplate=null,this.purgeOptions=new V,this.refreshInterval=0,this.screenSizePerspectiveEnabled=!0,this.sourceJSON=null,this.spatialReference=H.A.WGS84,this.type="stream",this.url=null,this.updateInterval=300,this.useViewTime=!0,this.webSocketUrl=null,this._debouncedSaveOperations=(0,m.sg)((async(e,t,i)=>{const{save:n,saveAs:s}=await r.e(7301).then(r.bind(r,87301));switch(e){case z.X.SAVE:return n(this,t);case z.X.SAVE_AS:return s(this,i,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){if(!("WebSocket"in globalThis))return this.addResolvingPromise(Promise.reject(new d.A("stream-layer:websocket-unsupported","WebSocket is not supported in this browser. StreamLayer will not have real-time connection with the stream service."))),Promise.resolve(this);const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Stream Service","Feed"]},e).catch(m.QP).then((()=>this._fetchService(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}set renderer(e){(0,P.yp)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=(0,o.L)(i,t,r)||void 0;return e||y.A.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return(0,R.PD)(t,r)}async connect(e){const[{createConnection:t}]=await Promise.all([Promise.all([r.e(893),r.e(3761)]).then(r.bind(r,30624)),this.load()]),i=this.geometryType?S.g.toJSON(this.geometryType):null,{customParameters:n=null,definitionExpression:s=null,geometryDefinition:o=null,maxReconnectionAttempts:l=0,maxReconnectionInterval:a=20,spatialReference:u=this.spatialReference}=e||this.createConnectionParameters(),d=t(this.parsedUrl,this.spatialReference,u,i,s,o,l,a,n??void 0),c=(0,p.vE)([this.on("send-message-to-socket",(e=>d.sendMessageToSocket(e))),this.on("send-message-to-client",(e=>d.sendMessageToClient(e)))]);return d.once("destroy",c.remove),d}createConnectionParameters(){return{spatialReference:this.spatialReference,customParameters:this.customParameters,definitionExpression:this.definitionExpression,geometryDefinition:this.geometryDefinition,maxReconnectionAttempts:this.maxReconnectionAttempts,maxReconnectionInterval:this.maxReconnectionInterval}}createPopupTemplate(e){return(0,J.tn)(this,e)}createQuery(){const e=new k.A;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}getFieldDomain(e,t){if(!this.fields)return null;let r=null;return this.fields.some((t=>(t.name===e&&(r=t.domain),!!r))),r}getField(e){return this.fieldsIndex.get(e)}serviceSupportsSpatialReference(e){return!0}sendMessageToSocket(e){this.emit("send-message-to-socket",e)}sendMessageToClient(e){this.emit("send-message-to-client",e)}async save(e){return this._debouncedSaveOperations(z.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(z.X.SAVE_AS,t,e)}write(e,t){const r=t?.messages;return this.webSocketUrl?(r?.push(Y(this,"using a custom websocket connection cannot be written to web scenes and web maps")),null):this.parsedUrl?super.write(e,t):(r?.push(Y(this,"using a client-side only connection without a url cannot be written to web scenes and web maps")),null)}async _fetchService(e){if(!this.webSocketUrl&&this.parsedUrl){if(!this.sourceJSON){const{data:t}=await(0,a.A)(this.parsedUrl.path,{query:{f:"json",...this.customParameters,...this.parsedUrl.query},responseType:"json",signal:e});this.sourceJSON=t}}else{if(!this.timeInfo?.trackIdField)throw new d.A("stream-layer:missing-metadata","The stream layer trackIdField must be specified.");if(!this.objectIdField){const e=this.fields.find((e=>"oid"===e.type))?.name;if(!e)throw new d.A("stream-layer:missing-metadata","The stream layer objectIdField must be specified.");this.objectIdField=e}if(!this.fields)throw new d.A("stream-layer:missing-metadata","The stream layer fields must be specified.");if(this.fields.some((e=>e.name===this.objectIdField))||this.fields.push(new N.A({name:this.objectIdField,alias:this.objectIdField,type:"oid"})),!this.geometryType)throw new d.A("stream-layer:missing-metadata","The stream layer geometryType must be specified.");this.webSocketUrl&&(this.url=this.webSocketUrl)}return this.read(this.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}),(0,P.yp)(this.renderer,this.fieldsIndex),(0,P.sv)(this.timeInfo,this.fieldsIndex),this.objectIdField||(this.objectIdField="__esri_stream_id__"),(0,C.L)(this,{origin:"service"})}};(0,n._)([(0,f.MZ)({type:String})],K.prototype,"copyright",void 0),(0,n._)([(0,f.MZ)({readOnly:!0})],K.prototype,"defaultPopupTemplate",null),(0,n._)([(0,f.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],K.prototype,"definitionExpression",void 0),(0,n._)([(0,f.MZ)({type:String})],K.prototype,"displayField",void 0),(0,n._)([(0,f.MZ)({type:B.A})],K.prototype,"elevationInfo",void 0),(0,n._)([(0,f.MZ)({json:{origins:{"web-map":{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],K.prototype,"featureReduction",null),(0,n._)([(0,f.MZ)(q.fields)],K.prototype,"fields",void 0),(0,n._)([(0,f.MZ)(q.fieldsIndex)],K.prototype,"fieldsIndex",void 0),(0,n._)([(0,f.MZ)({type:W.A,json:{name:"layerDefinition.definitionGeometry",write:!0}})],K.prototype,"geometryDefinition",void 0),(0,n._)([(0,f.MZ)({type:S.g.apiValues,json:{read:{reader:S.g.read}}})],K.prototype,"geometryType",void 0),(0,n._)([(0,f.MZ)(Z.kF)],K.prototype,"labelsVisible",void 0),(0,n._)([(0,f.MZ)({type:[G.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:U.w},write:!0}})],K.prototype,"labelingInfo",void 0),(0,n._)([(0,f.MZ)(Z.fV)],K.prototype,"legendEnabled",void 0),(0,n._)([(0,f.MZ)({type:["show","hide"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],K.prototype,"listMode",void 0),(0,n._)([(0,f.MZ)({type:g.jz})],K.prototype,"maxReconnectionAttempts",void 0),(0,n._)([(0,f.MZ)({type:g.jz})],K.prototype,"maxReconnectionInterval",void 0),(0,n._)([(0,f.MZ)(Z.hG)],K.prototype,"maxScale",void 0),(0,n._)([(0,f.MZ)(Z.hn)],K.prototype,"minScale",void 0),(0,n._)([(0,f.MZ)({type:String})],K.prototype,"objectIdField",void 0),(0,n._)([(0,f.MZ)({value:"ArcGISStreamLayer",type:["ArcGISStreamLayer"]})],K.prototype,"operationalLayerType",void 0),(0,n._)([(0,f.MZ)({readOnly:!0})],K.prototype,"outFields",void 0),(0,n._)([(0,f.MZ)(Z.M6)],K.prototype,"popupEnabled",void 0),(0,n._)([(0,f.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],K.prototype,"popupTemplate",void 0),(0,n._)([(0,f.MZ)({type:V})],K.prototype,"purgeOptions",void 0),(0,n._)([(0,f.MZ)({json:{read:!1,write:!1}})],K.prototype,"refreshInterval",void 0),(0,n._)([(0,f.MZ)({types:l.H,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{name:"layerDefinition.drawingInfo.renderer",types:l.X,write:!0}},write:{target:"layerDefinition.drawingInfo.renderer"}}})],K.prototype,"renderer",null),(0,n._)([(0,v.w)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,v.w)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],K.prototype,"readRenderer",null),(0,n._)([(0,f.MZ)((()=>{const e=(0,c.o8)(Z.PY);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],K.prototype,"screenSizePerspectiveEnabled",void 0),(0,n._)([(0,f.MZ)()],K.prototype,"sourceJSON",void 0),(0,n._)([(0,f.MZ)({type:H.A,json:{origins:{service:{read:{source:"spatialReference"}}}}})],K.prototype,"spatialReference",void 0),(0,n._)([(0,f.MZ)({json:{read:!1}})],K.prototype,"type",void 0),(0,n._)([(0,f.MZ)(Z.OZ)],K.prototype,"url",void 0),(0,n._)([(0,f.MZ)({type:Number})],K.prototype,"updateInterval",void 0),(0,n._)([(0,f.MZ)({json:{read:!1,write:!1}})],K.prototype,"useViewTime",void 0),(0,n._)([(0,f.MZ)({type:String})],K.prototype,"webSocketUrl",void 0),K=(0,n._)([(0,w.$)("esri.layers.StreamLayer")],K);const Q=K},18768:(e,t,r)=>{r.d(t,{b:()=>a});var i=r(90237),n=r(53966),s=r(10107),o=(r(44208),r(87811),r(40608)),l=r(60694);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.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,l.Jf)(e,n.A.getLogger(this)))}};return(0,i._)([(0,s.MZ)()],t.prototype,"title",null),(0,i._)([(0,s.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},87718:(e,t,r)=>{r.d(t,{F:()=>A});var i,n=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),l=r(49186),a=r(25482),u=r(93637),d=r(76369),p=r(59456),c=r(60945),y=r(66552),h=r(4718),m=r(61956);const f=new y.J({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new y.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let v=i=class extends a.oY{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:n,objectIds:s,units:o,distance:l}=this;return new m.A({geometry:(0,h.o8)(r),objectIds:(0,h.o8)(s),spatialRelationship:i,timeExtent:(0,h.o8)(n),where:t,units:o,distance:l,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:n,objectIds:s,units:o,distance:l}=this;return new i({geometry:(0,h.o8)(t),objectIds:(0,h.o8)(s),spatialRelationship:r,timeExtent:(0,h.o8)(n),where:e,units:o,distance:l})}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],v.prototype,"where",void 0),(0,n._)([(0,s.MZ)({types:p.yR,json:{write:!0}})],v.prototype,"geometry",void 0),(0,n._)([(0,s.MZ)({type:f.apiValues,json:{name:"spatialRel",read:{reader:f.read},write:{allowNull:!1,writer:f.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],v.prototype,"spatialRelationship",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],v.prototype,"distance",void 0),(0,n._)([(0,s.MZ)({type:[Number],json:{write:!0}})],v.prototype,"objectIds",void 0),(0,n._)([(0,s.MZ)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],v.prototype,"units",void 0),(0,n._)([(0,s.MZ)({type:c.A,json:{write:!0}})],v.prototype,"timeExtent",void 0),v=i=(0,n._)([(0,o.$)("esri.layers.support.FeatureFilter")],v);const w=v;var S;const _={read:{reader:d.LF},write:{writer:d.M9,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},b={read:{reader:d.LF},write:{writer:d.M9,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},I={name:"showExcludedLabels",default:!0};let M=S=class extends a.oY{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new l.A("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new l.A("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new S({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,n._)([(0,s.MZ)({type:w,json:{write:{allowNull:!0,writer(e,t,r,i){const n=e?.write({},i);n&&0!==Object.keys(n).length?(0,u.sM)(r,n,t):(0,u.sM)(r,null,t)}}}})],M.prototype,"filter",void 0),(0,n._)([(0,s.MZ)({json:{write:!0,origins:{"web-map":_,"portal-item":_}}})],M.prototype,"includedEffect",void 0),(0,n._)([(0,s.MZ)({json:{write:!0,origins:{"web-map":b,"portal-item":b}}})],M.prototype,"excludedEffect",void 0),(0,n._)([(0,s.MZ)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":I,"portal-item":I}}})],M.prototype,"excludedLabelsVisible",void 0),M=S=(0,n._)([(0,o.$)("esri.layers.support.FeatureEffect")],M);const T=M,x={write:{allowNull:!0}},A=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,n._)([(0,s.MZ)({type:T,json:{origins:{"web-map":x,"portal-item":x}}})],t.prototype,"featureEffect",void 0),t=(0,n._)([(0,o.$)("esri.layers.mixins.FeatureEffectLayer")],t),t}},16131:(e,t,r)=>{r.d(t,{q:()=>v});var i=r(90237),n=r(49186),s=r(84952),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),u=r(43937),d=r(89317),p=r(45917),c=r(49422);const y={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},h={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,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!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":y,"web-map/basemap":h,"web-map/tables":m,"link-chart/operational-layers":{...y,LinkChartLayer:!0},"link-chart/basemap":h,"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 g=r(10873);const v=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,r){return"Group Layer"===r?.portalItem?.type?void 0:e}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,c.R)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){e&&"tables"!==i?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}read(e,t){t&&(t.layer=this),(0,p.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=f[e];let i=!!r?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return t.messages?.push(new n.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof n.A&&"web-document-write:property-required"===e.name)).length;return(0,s.w8)(r?.url)?(t?.messages?.push(new n.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&&i?null:r}beforeSave(){}};return(0,i._)([(0,o.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,i._)([(0,l.w)("id",["id"])],t.prototype,"readId",null),(0,i._)([(0,o.MZ)(g.C1)],t.prototype,"listMode",void 0),(0,i._)([(0,u.K)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,o.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:d.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,u.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,o.MZ)(g.ke)],t.prototype,"opacity",void 0),(0,i._)([(0,o.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,i._)([(0,o.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,i._)([(0,u.K)("title"),(0,u.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,i._)([(0,o.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:d.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,i._)([(0,a.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(90237),n=r(92602),s=r(70333),o=r(78888),l=r(60999),a=r(49186),u=r(53966),d=r(97768),p=r(74887),c=r(84952),y=r(10107),h=(r(44208),r(87811),r(36005)),m=r(40608),f=r(43937),g=r(83531),v=r(20655),w=r(80812),S=r(41318),_=r(10407);const b=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,r){if(t.itemId)return new w.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,p.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.zf)(e)||u.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,p.QP)(e),!0))))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,_.It)(r);let n,o;if(i)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!n||!(0,c.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,a=!1,u=!1;if(!o)return{features:{edit:l,fullEdit:a},content:{updateItem:u}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,_.It)(r)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:a},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.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 r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,c.S8)(n.restUrl)===(0,c.S8)(i))return n.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,d=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return d.ok?S.A.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,c.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.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,i._)([(0,y.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.$)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},54310:(e,t,r)=>{r.d(t,{J:()=>w});var i=r(90237),n=r(53966),s=r(74887),o=r(10107),l=r(79901),a=(r(87811),r(44208),r(40608)),u=r(89317),d=r(5503),p=(r(60999),r(49186),r(14012),r(80559));const c=new d.A,y=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function m(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:m(t,e%t):0}let f=0,g=0;function v(){const e=Date.now();let t=!1;for(const r of c){const i=r.deref();i?i.refreshInterval&&e-(y.get(i)??0)+5>=6e4*i.refreshInterval&&(y.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,p.fm)((()=>{const e=Date.now();let t=0;for(const r of c){const i=r.deref();i&&(t=m(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?y.get(i)||y.set(i,e):y.delete(i))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(v,g)}}));const w=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,s.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(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,i._)([(0,o.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.K}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,l.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,a.$)("esri.layers.mixins.RefreshableLayer")],t),t}},82935:(e,t,r)=>{r.d(t,{e:()=>c});var i=r(90237),n=r(60945),s=r(70668),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),u=r(30524),d=r(96184),p=r(73133);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=p.j.fromJSON(r.timeOffsetUnits);return i&&n?new s.A({value:i,unit:n}):null}set timeInfo(e){(0,u.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,o.MZ)({type:n.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,o.MZ)({type:s.A})],t.prototype,"timeOffset",void 0),(0,i._)([(0,l.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,o.MZ)({value:null,type:d.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,o.MZ)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,a.$)("esri.layers.mixins.TemporalLayer")],t),t}},20437:(e,t,r)=>{r.d(t,{A:()=>f});var i,n=r(90237),s=r(66552),o=r(25482),l=r(10107),a=r(56507),u=(r(87811),r(44208),r(93223)),d=r(36005),p=r(40608),c=r(72088),y=r(98453);const h=new s.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=i=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?h.fromJSON(r.fieldValueType):null}clone(){return new i({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,n._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,n._)([(0,l.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,n._)([(0,l.MZ)()],m.prototype,"description",void 0),(0,n._)([(0,d.w)("description")],m.prototype,"readDescription",null),(0,n._)([(0,l.MZ)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],m.prototype,"domain",void 0),(0,n._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,n._)([(0,l.MZ)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,n._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,n._)([(0,u.e)(y.m)],m.prototype,"type",void 0),(0,n._)([(0,l.MZ)()],m.prototype,"valueType",void 0),(0,n._)([(0,d.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,n._)([(0,l.MZ)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,n._)([(0,p.$)("esri.layers.support.Field")],m);const f=m},95466:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(49186),n=r(25482),s=r(53966),o=r(91869),l=r(3330),a=r(30524),u=r(56400),d=r(96285);const p=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],f(e))}static fromLayerJSON(e){return new c(e.fields??[],f(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=h(t);if(t&&i){const n=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?l.GB.instance:t===u.n$?d.mQ.utcInstance:(0,o.tE)(p,t,(()=>d.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function h(e){return(0,a.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,a=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.dateFieldsTimeReference?(0,u.ZS)(n.dateFieldsTimeReference):l??u.n$:null,d=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,u.ZS)(i.timeReference):l:null,p=new Map([[y(n?.creationDateField??""),a],[y(n?.editDateField??""),a],[y(s),d],[y(o),d]]);for(const{name:i,type:n}of e.fields)if(m.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=p.get(y(i??""))??l;t.set(i,e)}return t}},96184:(e,t,r)=>{r.d(t,{A:()=>m});var i=r(90237),n=r(60945),s=r(70668),o=r(69540),l=r(25482),a=r(10107),u=(r(44208),r(53966),r(87811),r(36005)),d=r(40608),p=r(43937),c=r(56400);function y(e,t){return s.A.fromJSON({value:e,unit:t})}let h=class extends((0,o.O)(l.oY)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new n.A({start:r,end:i})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,a.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i._)([(0,a.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i._)([(0,a.MZ)({type:n.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i._)([(0,u.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i._)([(0,p.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i._)([(0,a.MZ)({type:s.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i._)([(0,u.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i._)([(0,p.K)("interval")],h.prototype,"writeInterval",null),(0,i._)([(0,a.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i._)([(0,a.MZ)((0,c.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,i._)([(0,d.$)("esri.layers.support.TimeInfo")],h);const m=h},72088:(e,t,r)=>{r.d(t,{rS:()=>M,gK:()=>I}),r(44208);var i,n=r(90237),s=r(4718),o=r(10107),l=(r(53966),r(93223)),a=r(40608),u=r(25482);r(87811);let d=i=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,o.MZ)({type:[String,Number],json:{write:!0}})],d.prototype,"code",void 0),d=i=(0,n._)([(0,a.$)("esri.layers.support.CodedValue")],d);const p=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,l.e)(p)],c.prototype,"type",void 0),c=(0,n._)([(0,a.$)("esri.layers.support.Domain")],c);const y=c;var h;let m=h=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new h({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,o.MZ)({type:[d],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,n._)([(0,l.e)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=h=(0,n._)([(0,a.$)("esri.layers.support.CodedValueDomain")],m);const f=m;var g;r(49186);let v=g=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,n._)([(0,l.e)({inherited:"inherited"})],v.prototype,"type",void 0),v=g=(0,n._)([(0,a.$)("esri.layers.support.InheritedDomain")],v);const w=v;var S;let _=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,n._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],_.prototype,"maxValue",void 0),(0,n._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],_.prototype,"minValue",void 0),(0,n._)([(0,l.e)({range:"range"})],_.prototype,"type",void 0),_=S=(0,n._)([(0,a.$)("esri.layers.support.RangeDomain")],_);const b=_,I={key:"type",base:y,typeMap:{range:_,"coded-value":f,inherited:w}};function M(e){if(!e?.type)return null;switch(e.type){case"range":return b.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},32730:(e,t,r)=>{r.d(t,{BI:()=>f,D3:()=>h,XJ:()=>m,lc:()=>y,mX:()=>v,rU:()=>g,tH:()=>I});var i=r(799);const n="__begin__",s="__end__",o=new RegExp(n,"ig"),l=new RegExp(s,"ig"),a=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),d='"',p=d+" + ",c=" + "+d;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function f(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return v(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return I(t.expression)}return null}function v(e){let t;return e?(t=(0,i.HC)(e,(e=>n+'$feature["'+e+'"]'+s)),t=a.test(t)?t.replace(a,""):d+t,t=u.test(t)?t.replace(u,""):t+d,t=t.replaceAll(o,p).replaceAll(l,c)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,S=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,b=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function I(e){if(!e)return null;let t=S.exec(e)||_.exec(e);return t?t[1]||t[3]:(t=b.exec(e),t?t[2]:null)}},39383:(e,t,r)=>{r.d(t,{w:()=>u,z:()=>p});var i=r(49186),n=r(4718),s=r(53966),o=r(81457);const l=()=>s.A.getLogger("esri.layers.support.labelingInfo"),a=/\[([^[\]]+)\]/gi;function u(e,t,r){return e?e.map((e=>{const i=new o.A;if(i.read(e,r),i.labelExpression){const e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(a,((t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`))}return i})):null}const d={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:null,esriGeometryEnvelope:null};function p(e,t){const r=(0,n.o8)(e);return r.some((e=>function(e,t){const r=e.labelPlacement,n=d[t];if(!e.symbol)return l().warn("No ILabelClass symbol specified."),!0;if(!n)return l().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),!0;if(!n.includes(r)){const i=n[0];r&&l().warn(`Found invalid label placement type ${r} for ${t}. Defaulting to ${i}`),e.labelPlacement=i}return!1}(e,t)))?[]:r}},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},8947:(e,t,r)=>{r.d(t,{L:()=>o});var i=r(60999),n=r(74887),s=r(67076);async function o(e,t,r){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const l=await(0,i.Ke)(o.populateFromStyle());if((0,n.Te)(r),!1===l.ok){const r=l.error;t?.messages&&t.messages.push(new s.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},59868:(e,t,r)=>{r.d(t,{A7:()=>u,Cx:()=>d,Hk:()=>p,UK:()=>a}),r(44208);var i=r(94985),n=r(31593),s=r(53930),o=r(68249),l=r(93470);const a=s.A.fromJSON(l.Cb),u=n.A.fromJSON(l.yM),d=i.A.fromJSON(l.WR),p=o.A.fromJSON(l.JZ);s.A.fromJSON(l.nC),n.A.fromJSON(l.HW),i.A.fromJSON(l.b6)},93470:(e,t,r)=>{r.d(t,{Cb:()=>n,HW:()=>u,JZ:()=>l,WR:()=>o,b6:()=>d,nC:()=>a,yM:()=>s});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},92935:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8961,5899,3069],{39516:(e,t,r)=>{async function n(e,t){const{WhereClause:n}=await Promise.all([r.e(835),r.e(4800)]).then(r.bind(r,50835));return n.create(e,t)}function i(e,t){return"1=1"===e?t:"1=1"===t?e:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>n,m:()=>i})},3330:(e,t,r)=>{r.d(t,{GB:()=>i,Qo:()=>s,Y4:()=>o});var n=r(96285);class i{}function o(e){return e instanceof n.bo?e===i.instance:"unknown"===e?.toString().toLowerCase()}function s(e){return o(e)?i.instance:e}i.instance=new n.oh("Etc/UTC")},13069:(e,t,r)=>{r.d(t,{lk:()=>i,vD:()=>s,yS:()=>o});const n="randomUUID"in crypto;function i(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}},70328:(e,t,r)=>{r.d(t,{BI:()=>h,Ej:()=>u,Hq:()=>p,Ie:()=>f,Jt:()=>m,Ne:()=>c,RF:()=>l,aI:()=>S,fA:()=>o,hZ:()=>d,iT:()=>a,is:()=>g,qv:()=>w,vI:()=>y,v_:()=>v,vt:()=>i,w1:()=>s});var n=r(5443);function i(e=v){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,n,o,s,l=i()){return l[0]=e,l[1]=t,l[2]=r,l[3]=n,l[4]=o,l[5]=s,l}function s(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t,r=0,n=t.length/3){let i=e[0],o=e[1],s=e[2],l=e[3],a=e[4],p=e[5];for(let e=0;e<n;e++)i=Math.min(i,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),p=Math.max(p,t[r+3*e+2]);e[0]=i,e[1]=o,e[2]=s,e[3]=l,e[4]=a,e[5]=p}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function c(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function y(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function f(e){return e?d(e,w):i(w)}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function h(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function S(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],v=[0,0,0,0,0,0];i()},17136:(e,t,r)=>{r.d(t,{el:()=>b});var n=r(92602),i=r(49186),o=r(53966),s=r(39829),l=r(82799),a=r(80754),p=r(21325),u=r(28735),c=(r(59456),r(78888)),y=r(65864),d=r(2272),f=r(84952),m=r(92300);const h=()=>o.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function S(e){return"polyline"===e[0].type}function w(e,t,r){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h().error(e),new i.A(e)}const r=(0,a.r8)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const i=e[n][0],o=e[n][1],s=e[n+1][0],l=e[n+1][1],a=Math.sqrt((s-i)*(s-i)+(l-o)*(l-o)),p=(l-o)/a,u=(s-i)/a,c=a/t;if(c>1){for(let e=1;e<=c-1;e++){const n=e*t,s=u*n+i,l=p*n+o;r.push([s,l])}const e=(a+Math.floor(c-1)*t)/2,n=u*e+i,s=p*e+o;r.push([n,s])}r.push([s,l])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:n,spatialReference:e.spatialReference}):new l.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.ci)(t,!0)}return r&&(e=(0,a.kS)(e,r)),e}function v(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,a.kd)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,a.kd)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,a.kd)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,a.kd)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function _(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const i=t.cutIndexes[n],o=t.geometries[n],s=(0,a.r8)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,a.kd)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(n,0))}return!0}}))}if(i===r){if(g(e))for(const t of(0,a.r8)(o))e[i]=e[i].addRing(t);else if(S(e))for(const t of(0,a.r8)(o))e[i]=e[i].addPath(t)}else r=i,e[i]=o}return e}async function b(e,t,r){if(!Array.isArray(e))return b([e],t);t&&"string"!=typeof t&&h().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let o,g,S,M,x,A,T,F,O=0;const N=[],R=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,g=(0,p.Vp)(o),S=o.isWebMercator,A=S?102100:4326,M=a.j7[A].maxX,x=a.j7[A].minX,T=a.j7[A].plus180Line,F=a.j7[A].minus180Line),g)if("mesh"===t.type)R.push(t);else if("point"===t.type)R.push(v(t.clone(),M,x));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>v(e,M,x))),R.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);R.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,a.kd)(e.xmin,x)*(2*M);let n=0===r?t.clone():(0,a.kS)(t.clone(),r);e.offset(r,0);let{xmin:i,xmax:o}=e;i=Number(i.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(T)&&o!==M?(O=o>O?o:O,n=w(n,S),N.push(n),R.push("cut")):e.intersects(F)&&i!==x?(O=o*(2*M)>O?o*(2*M):O,n=w(n,S,360),N.push(n),R.push("cut")):R.push(n)}else R.push(t.clone());else R.push(t);else R.push(t);let C=(0,a.kd)(O,M),Z=-90;const I=C,L=new l.A;for(;C>0;){const e=360*C-180;L.addPath([[e,Z],[e,-1*Z]]),Z*=-1,C--}if(N.length>0&&I>0){const t=_(N,await async function(e,t,r,n){const i=(0,d.Dl)(e),o=t[0].spatialReference,s={...n,responseType:"json",query:{...i.query,f:"json",sr:(0,p.YX)(o),target:JSON.stringify({geometryType:(0,y.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},l=await(0,c.A)(i.path+"/cut",s),{cutIndexes:a,geometries:u=[]}=l.data;return{cutIndexes:a,geometries:u.map((e=>{const t=(0,y.rS)(e);return t.spatialReference=o,t}))}}(i,N,L,r)),n=[],o=[];for(let r=0;r<R.length;r++){const i=R[r];if("cut"!==i)o.push(i);else{const i=t.shift(),s=e[r];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&i.rings.length>=s.rings.length?(n.push(i),o.push("simplify")):o.push(S?(0,u.Gh)(i):i)}}if(!n.length)return o;const s=await async function(e,t,r){const n="string"==typeof e?(0,f.An)(e):e,i=t[0].spatialReference,o=(0,y.$B)(t[0]),s={...r,query:{...n.query,f:"json",sr:(0,p.YX)(i),geometries:JSON.stringify((0,m.X)(t))}},{data:l}=await(0,c.A)(n.path+"/simplify",s);return(0,m.V)(l.geometries,o,i)}(i,n,r),l=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?l.push(t):l.push(S?(0,u.Gh)(s.shift()):s.shift())}return l}const J=[];for(let e=0;e<R.length;e++){const t=R[e];if("cut"!==t)J.push(t);else{const e=N.shift();J.push(!0===S?(0,u.Gh)(e):e)}}return J}},80754:(e,t,r)=>{r.d(t,{j7:()=>s,kS:()=>a,kd:()=>l,r8:()=>p});var n=r(82799),i=r(16930),o=r(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const r=p(e);for(const e of r)for(const r of e)r[0]+=t;return e}function p(e){return(0,o.Bi)(e)?e.rings:e.paths}},35079:(e,t,r)=>{r.r(t),r.d(t,{default:()=>K});var n=r(90237),i=(r(59456),r(52106)),o=(r(61147),r(5503)),s=r(49186),l=r(4718),a=r(92071),p=r(93637),u=r(67076),c=r(10107),y=(r(44208),r(53966),r(36005)),d=r(40608),f=r(43937),m=r(57251),h=r(19419),g=r(17136),S=r(21325),w=r(13600),v=(r(87811),r(62885));let _=class extends o.A{constructor(e){super(e),this.addHandles([this.on("before-add",(e=>{null==e.item&&e.preventDefault()})),this.on("after-add",(e=>this._own(e.item))),this.on("after-remove",(e=>this._release(e.item)))])}get owner(){return this._get("owner")}set owner(e){e!==this._get("owner")&&(this._releaseAll(),this._set("owner",e),this._ownAll())}_ownAll(){for(const e of this.items)this._own(e)}_releaseAll(){for(const e of this.items)this._release(e)}_createNewInstance(e){return this.itemType?new(o.A.ofType(this.itemType.Type))(e):new o.A(e)}};(0,n._)([(0,c.MZ)()],_.prototype,"owner",null),_=(0,n._)([(0,d.$)("esri.core.support.OwningCollection")],_);var b=r(4146),M=r(63074),x=r(25036),A=r(56507),T=r(7695);let F=class extends _{_own(e){e.layer&&"remove"in e.layer&&e.layer!==this.owner&&e.layer.remove(e),e.layer=this.owner}_release(e){e.layer===this.owner&&(e.layer=null)}};(0,n._)([(0,T.u)({Type:i.A,ensureType:(0,A.dp)(i.A)})],F.prototype,"itemType",void 0),F=(0,n._)([(0,d.$)("esri.support.GraphicsCollection")],F);var O=r(88625);let N=class extends((0,M.d)((0,x.j)(b.A))){constructor(e){super(e),this.elevationInfo=null,this.graphics=new F,this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}on(e,t){return super.on(e,t)}graphicChanged(e){this.emit("graphic-update",e)}};var R,C;(0,n._)([(0,c.MZ)({type:O.A})],N.prototype,"elevationInfo",void 0),(0,n._)([(0,c.MZ)((R=F,C="graphics",{type:R,cast:v.H,set(e){const t=(0,v.V)(e,this._get(C),R);t.owner=this,this._set(C,t)}}))],N.prototype,"graphics",void 0),(0,n._)([(0,c.MZ)({type:["show","hide"]})],N.prototype,"listMode",void 0),(0,n._)([(0,c.MZ)()],N.prototype,"screenSizePerspectiveEnabled",void 0),(0,n._)([(0,c.MZ)({readOnly:!0})],N.prototype,"type",void 0),(0,n._)([(0,c.MZ)({constructOnly:!0})],N.prototype,"internal",void 0),N=(0,n._)([(0,d.$)("esri.layers.GraphicsLayer")],N);const Z=N;var I=r(33032),L=r(16131),J=r(8303),D=r(20437),j=r(94985),E=r(31593),z=r(53930),G=r(68249),P=r(16930),q=r(5443);function B(e){return"markup"===e.featureCollectionType||e.layers.some((e=>null!=e.layerDefinition.visibilityField||!V(e)))}function V({layerDefinition:e,featureSet:t}){const r=e.geometryType??t.geometryType;return H.find((t=>r===t.geometryTypeJSON&&e.drawingInfo?.renderer?.symbol?.type===t.identifyingSymbol.type))}function Q(){return new q.A({xmin:-180,ymin:-90,xmax:180,ymax:90})}const $=new D.A({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),k=new D.A({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0,length:255});let U=class extends Z{constructor(e){super(e),this.visibilityMode="inherited"}initialize(){for(const e of this.graphics)e.sourceLayer=this.layer;this.graphics.on("after-add",(e=>{e.item.sourceLayer=this.layer})),this.graphics.on("after-remove",(e=>{e.item.sourceLayer=null}))}get fullExtent(){const e=this.layer?.spatialReference,t=this.fullBounds;return e?null==t?(0,m.projectOrLoad)(Q(),e).geometry:(0,h.w1)(t,e):null}get fullBounds(){const e=this.layer?.spatialReference;if(!e)return null;const t=(0,h.Ie)();return this.graphics.forEach((r=>{const n=null!=r.geometry?(0,m.projectOrLoad)(r.geometry,e).geometry:null;null!=n&&(0,h.fT)(t,"point"===n.type?n:n.extent,t)})),(0,h.aI)(t,h.qv)?null:t}get sublayers(){return this.graphics}};(0,n._)([(0,c.MZ)({readOnly:!0})],U.prototype,"fullExtent",null),(0,n._)([(0,c.MZ)({readOnly:!0})],U.prototype,"fullBounds",null),(0,n._)([(0,c.MZ)({readOnly:!0})],U.prototype,"sublayers",null),(0,n._)([(0,c.MZ)()],U.prototype,"layer",void 0),(0,n._)([(0,c.MZ)()],U.prototype,"layerId",void 0),(0,n._)([(0,c.MZ)({readOnly:!0})],U.prototype,"visibilityMode",void 0),U=(0,n._)([(0,d.$)("esri.layers.MapNotesLayer.MapNotesSublayer")],U);const H=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:(new j.A).toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:(new E.A).toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:(new z.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:(new z.A).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:(new G.A).toJSON()}];let W=class extends((0,M.d)((0,x.j)((0,L.q)((0,J.A)((0,a.P)(b.A)))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=P.A.WGS84,this.sublayers=new o.A(H.map((e=>new U({id:e.id,layerId:e.layerId,title:e.title,layer:this})))),this.title="Map Notes",this.type="map-notes",this.visibilityMode="inherited"}readCapabilities(e,t,r){return{operations:{supportsMapNotesEditing:!B(t)&&"portal-item"!==r?.origin}}}readFeatureCollections(e,t,r){if(!B(t))return null;const n=t.layers.map((e=>{const t=new w.default;return t.read(e,r),t}));return new o.A({items:n})}readLegacyfeatureCollectionJSON(e,t){return B(t)?(0,l.o8)(t.featureCollection):null}get fullExtent(){const e=this.spatialReference,t=(0,h.Ie)();return null!=this.sublayers?this.sublayers.forEach((({fullBounds:e})=>null!=e?(0,h.fT)(t,e,t):t),t):this.featureCollectionJSON?.layers.some((e=>e.layerDefinition.extent))&&this.featureCollectionJSON.layers.forEach((r=>{const n=(0,m.projectOrLoad)(r.layerDefinition.extent,e).geometry;null!=n&&(0,h.fT)(t,n,t)})),(0,h.aI)(t,h.qv)?(0,m.projectOrLoad)(Q(),e).geometry:(0,h.w1)(t,e)}readMinScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.minScale)return e.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.maxScale)return e.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?P.A.fromJSON(t.layers[0].layerDefinition.spatialReference):P.A.WGS84}readSublayers(e,t,r){if(B(t))return null;const n=[];let s=t.layers.reduce(((e,t)=>Math.max(e,t.layerDefinition.id??-1)),-1)+1;for(const e of t.layers){const{layerDefinition:t,featureSet:r}=e,o=t.id??s++,l=V(e);if(null!=l){const e=new U({id:l.id,title:t.name,layerId:o,layer:this,graphics:r.features.map((({geometry:e,symbol:t,attributes:r,popupInfo:n})=>i.A.fromJSON({attributes:r,geometry:e,symbol:t,popupTemplate:n})))});n.push(e)}}return new o.A(n)}writeSublayers(e,t,r,n){const{minScale:i,maxScale:o}=this;if(null==e)return;const l=e.some((e=>e.graphics.length>0));if(!this.capabilities.operations.supportsMapNotesEditing)return void(l&&n?.messages?.push(new s.A("map-notes-layer:editing-not-supported","New map notes cannot be added to this layer")));const a=[];let u=this.spatialReference.toJSON();e:for(const t of e)for(const e of t.graphics)if(null!=e.geometry){u=e.geometry.spatialReference.toJSON();break e}for(const t of H){const r=e.find((e=>t.id===e.id));this._writeMapNoteSublayer(a,r,t,i,o,u,n)}(0,p.sM)("featureCollection.layers",a,t)}get textLayer(){return this._findSublayer("textLayer")}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}read(e,t){"featureCollection"in e&&(e=(0,l.o8)(e),Object.assign(e,e.featureCollection)),super.read(e,t)}async beforeSave(){if(null==this.sublayers)return;let e=null;const t=[];for(const r of this.sublayers)for(const n of r.graphics)if(null!=n.geometry){const r=n.geometry;e?(0,S.aI)(r.spatialReference,e)||((0,m.canProjectWithoutEngine)(r.spatialReference,e)||(0,m.isLoaded)()||await(0,m.load)(),n.geometry=(0,m.project)(r,e)):e=r.spatialReference,t.push(n)}const r=await(0,g.el)(t.map((e=>e.geometry)));t.forEach(((e,t)=>e.geometry=r[t]))}_findSublayer(e){return null==this.sublayers?null:this.sublayers?.find((t=>t.id===e))??null}_writeMapNoteSublayer(e,t,r,n,i,o,s){const a=[];if(null!=t){for(const e of t.graphics)this._writeMapNote(a,e,r.geometryType,s);this._normalizeObjectIds(a,$),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:(0,l.o8)(r.identifyingSymbol)}},id:t.layerId,geometryType:r.geometryTypeJSON,minScale:n,maxScale:i,objectIdField:"OBJECTID",fields:[$.toJSON(),k.toJSON()],spatialReference:o},featureSet:{features:a,geometryType:r.geometryTypeJSON}})}}_writeMapNote(e,t,r,n){if(null==t)return;const{geometry:i,symbol:o,popupTemplate:s}=t;if(null==i)return;if(i.type!==r)return void n?.messages?.push(new u.A("map-notes-layer:invalid-geometry-type",`Geometry "${i.type}" cannot be saved in "${r}" layer`,{graphic:t}));if(null==o)return void n?.messages?.push(new u.A("map-notes-layer:no-symbol","Skipping map notes with no symbol",{graphic:t}));const l={attributes:{...t.attributes},geometry:i.toJSON(),symbol:o.toJSON()};null!=s&&(l.popupInfo=s.toJSON()),e.push(l)}_normalizeObjectIds(e,t){const r=t.name;let n=(0,I.H)(r,e)+1;const i=new Set;for(const t of e){t.attributes||(t.attributes={});const{attributes:e}=t;(null==e[r]||i.has(e[r]))&&(e[r]=n++),i.add(e[r])}}};(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"capabilities",void 0),(0,n._)([(0,y.w)(["portal-item","web-map"],"capabilities",["layers"])],W.prototype,"readCapabilities",null),(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"featureCollections",void 0),(0,n._)([(0,y.w)(["web-map","portal-item"],"featureCollections",["layers"])],W.prototype,"readFeatureCollections",null),(0,n._)([(0,c.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],W.prototype,"featureCollectionJSON",void 0),(0,n._)([(0,y.w)(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],W.prototype,"readLegacyfeatureCollectionJSON",null),(0,n._)([(0,c.MZ)({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],W.prototype,"featureCollectionType",void 0),(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"fullExtent",null),(0,n._)([(0,c.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{target:"featureCollection.showLegend",overridePolicy(){return{enabled:null!=this.featureCollectionJSON}}}}}}})],W.prototype,"legendEnabled",void 0),(0,n._)([(0,c.MZ)({type:["show","hide","hide-children"]})],W.prototype,"listMode",void 0),(0,n._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],W.prototype,"minScale",void 0),(0,n._)([(0,y.w)(["web-map","portal-item"],"minScale",["layers"])],W.prototype,"readMinScale",null),(0,n._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],W.prototype,"maxScale",void 0),(0,n._)([(0,y.w)(["web-map","portal-item"],"maxScale",["layers"])],W.prototype,"readMaxScale",null),(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"multipointLayer",null),(0,n._)([(0,c.MZ)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],W.prototype,"operationalLayerType",void 0),(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"pointLayer",null),(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"polygonLayer",null),(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"polylineLayer",null),(0,n._)([(0,c.MZ)({type:P.A})],W.prototype,"spatialReference",void 0),(0,n._)([(0,y.w)(["web-map","portal-item"],"spatialReference",["layers"])],W.prototype,"readSpatialReference",null),(0,n._)([(0,c.MZ)({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],W.prototype,"sublayers",void 0),(0,n._)([(0,y.w)("web-map","sublayers",["layers"])],W.prototype,"readSublayers",null),(0,n._)([(0,f.K)("web-map","sublayers")],W.prototype,"writeSublayers",null),(0,n._)([(0,c.MZ)({readOnly:!0})],W.prototype,"textLayer",null),(0,n._)([(0,c.MZ)()],W.prototype,"title",void 0),(0,n._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],W.prototype,"type",void 0),W=(0,n._)([(0,d.$)("esri.layers.MapNotesLayer")],W);const K=W},33032:(e,t,r)=>{r.d(t,{H:()=>i,L:()=>n});const n=1;function i(e,t){let r=0;for(const n of t){const t=n.attributes?.[e];"number"==typeof t&&isFinite(t)&&(r=Math.max(r,t))}return r}},52136:(e,t,r)=>{r.d(t,{p:()=>s});var n=r(90237),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,n._)([(0,i.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,n._)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],t),t}},18768:(e,t,r)=>{r.d(t,{b:()=>a});var n=r(90237),i=r(53966),o=r(10107),s=(r(44208),r(87811),r(40608)),l=r(60694);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.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,l.Jf)(e,i.A.getLogger(this)))}};return(0,n._)([(0,o.MZ)()],t.prototype,"title",null),(0,n._)([(0,o.MZ)({type:String})],t.prototype,"url",null),t=(0,n._)([(0,s.$)("esri.layers.mixins.ArcGISService")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(90237),i=r(69540),o=r(25482),s=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),p=r(43937),u=r(72088),c=r(29005);let y=class extends((0,i.O)(o.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,n._)([(0,s.MZ)({json:{write:!0}})],y.prototype,"id",void 0),(0,n._)([(0,s.MZ)({json:{write:!0}})],y.prototype,"name",void 0),(0,n._)([(0,s.MZ)({json:{write:!0}})],y.prototype,"domains",void 0),(0,n._)([(0,l.w)("domains")],y.prototype,"readDomains",null),(0,n._)([(0,p.K)("domains")],y.prototype,"writeDomains",null),(0,n._)([(0,s.MZ)({type:[c.A],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,n._)([(0,a.$)("esri.layers.support.FeatureType")],y);const d=y},20437:(e,t,r)=>{r.d(t,{A:()=>h});var n,i=r(90237),o=r(66552),s=r(25482),l=r(10107),a=r(56507),p=(r(87811),r(44208),r(93223)),u=r(36005),c=r(40608),y=r(72088),d=r(98453);const f=new o.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=n=class extends s.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?f.fromJSON(r.fieldValueType):null}clone(){return new n({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,i._)([(0,l.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,i._)([(0,l.MZ)()],m.prototype,"description",void 0),(0,i._)([(0,u.w)("description")],m.prototype,"readDescription",null),(0,i._)([(0,l.MZ)({types:y.gK,json:{read:{reader:y.rS},write:!0}})],m.prototype,"domain",void 0),(0,i._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,i._)([(0,l.MZ)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,i._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,i._)([(0,p.e)(d.m)],m.prototype,"type",void 0),(0,i._)([(0,l.MZ)()],m.prototype,"valueType",void 0),(0,i._)([(0,u.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,i._)([(0,l.MZ)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=n=(0,i._)([(0,c.$)("esri.layers.support.Field")],m);const h=m},95466:(e,t,r)=>{r.d(t,{A:()=>y});var n=r(49186),i=r(25482),o=r(53966),s=r(91869),l=r(3330),a=r(30524),p=r(56400),u=r(96285);const c=new Map;class y{static fromJSON(e){return new y(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new y(e.fields??[],h(e))}static fromLayerJSON(e){return new y(e.fields??[],h(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,n=f(t);if(t&&n){const i=d(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(n,e),r.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(d(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(o.A.getLogger("esri.layers.support.FieldsIndex").error(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),p.n$):m.has(t.type)?p.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===p.L5?l.GB.instance:t===p.n$?u.mQ.utcInstance:(0,s.tE)(c,t,(()=>u.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,i.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function d(e){return e.trim().toLowerCase()}function f(e){return(0,a.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function h(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:i}=e,o=(n?"startField"in n?n.startField:n.startTimeField:"")??"",s=(n?"endField"in n?n.endField:n.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,p.ZS)(e.dateFieldsTimeReference):null,a=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.dateFieldsTimeReference?(0,p.ZS)(i.dateFieldsTimeReference):l??p.n$:null,u=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.timeReference?(0,p.ZS)(n.timeReference):l:null,c=new Map([[d(i?.creationDateField??""),a],[d(i?.editDateField??""),a],[d(o),u],[d(s),u]]);for(const{name:n,type:i}of e.fields)if(m.has(i))t.set(n,p.L5);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(n,null);else if(r)t.set(n,p.L5);else{const e=c.get(d(n??""))??l;t.set(n,e)}return t}},37352:(e,t,r)=>{r.d(t,{A:()=>u});var n,i=r(90237),o=r(5503),s=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let p=n=class extends s.oY{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.A}clone(){return new n({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,i._)([(0,l.MZ)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,i._)([(0,l.MZ)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=n=(0,i._)([(0,a.$)("esri.layers.support.LayerFloorInfo")],p);const u=p},72088:(e,t,r)=>{r.d(t,{rS:()=>x,gK:()=>M}),r(44208);var n,i=r(90237),o=r(4718),s=r(10107),l=(r(53966),r(93223)),a=r(40608),p=r(25482);r(87811);let u=n=class extends p.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,s.MZ)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=n=(0,i._)([(0,a.$)("esri.layers.support.CodedValue")],u);const c=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let y=class extends p.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,l.e)(c)],y.prototype,"type",void 0),y=(0,i._)([(0,a.$)("esri.layers.support.Domain")],y);const d=y;var f;let m=f=class extends d{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,o.o8)(this.codedValues),name:this.name})}};(0,i._)([(0,s.MZ)({type:[u],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,i._)([(0,l.e)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=f=(0,i._)([(0,a.$)("esri.layers.support.CodedValueDomain")],m);const h=m;var g;r(49186);let S=g=class extends d{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,i._)([(0,l.e)({inherited:"inherited"})],S.prototype,"type",void 0),S=g=(0,i._)([(0,a.$)("esri.layers.support.InheritedDomain")],S);const w=S;var v;let _=v=class extends d{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new v({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i._)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],_.prototype,"maxValue",void 0),(0,i._)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],_.prototype,"minValue",void 0),(0,i._)([(0,l.e)({range:"range"})],_.prototype,"type",void 0),_=v=(0,i._)([(0,a.$)("esri.layers.support.RangeDomain")],_);const b=_,M={key:"type",base:d,typeMap:{range:_,"coded-value":h,inherited:w}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return b.fromJSON(e);case"codedValue":return h.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},98453:(e,t,r)=>{r.d(t,{m:()=>n});const n=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},32730:(e,t,r)=>{r.d(t,{BI:()=>h,D3:()=>f,XJ:()=>m,lc:()=>d,mX:()=>S,rU:()=>g,tH:()=>M});var n=r(799);const i="__begin__",o="__end__",s=new RegExp(i,"ig"),l=new RegExp(o,"ig"),a=new RegExp("^"+i,"i"),p=new RegExp(o+"$","i"),u='"',c=u+" + ",y=" + "+u;function d(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function f(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=d(e.labelExpression),t.type="conventional"),t}function h(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return S(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return M(t.expression)}return null}function S(e){let t;return e?(t=(0,n.HC)(e,(e=>i+'$feature["'+e+'"]'+o)),t=a.test(t)?t.replace(a,""):u+t,t=p.test(t)?t.replace(p,""):t+u,t=t.replaceAll(s,c).replaceAll(l,y)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,b=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function M(e){if(!e)return null;let t=v.exec(e)||_.exec(e);return t?t[1]||t[3]:(t=b.exec(e),t?t[2]:null)}},22453:(e,t,r)=>{r.d(t,{S:()=>c,d:()=>_});var n=r(44208),i=r(60694);function o(e,t,r){return!!l(e,t,r)}function s(e,t,r){return l(e,t,r)}function l(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const a={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function c(e,t){return{analytics:y(e),attachment:d(e),data:f(e),metadata:m(e),operations:h(e.capabilities,e,t),query:g(e,t),queryRelated:S(e),queryTopFeatures:w(e),editing:v(e)}}function y(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function d(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:o(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=a[e.name];t&&(r[t]=!!e.isEnabled)})),r}function f(e){return{isVersioned:o(e,"isDataVersioned",!1),supportsAttachment:o(e,"hasAttachments",!1),supportsM:o(e,"hasM",!1),supportsZ:o(e,"hasZ",!1)}}function m(e){return{supportsAdvancedFieldProperties:o(e,"supportsFieldDescriptionProperty",!1)}}function h(e,t,r){const n=e?e.toLowerCase().split(",").map((e=>e.trim())):[],s=r?(0,i.qg)(r):null,l=n.includes(null!=s&&"MapServer"===s.serverType?"data":"query"),a=n.includes("editing")&&!t.datesInUnknownTimezone;let p=a&&n.includes("create"),u=a&&n.includes("delete"),c=a&&n.includes("update");const y=n.includes("changetracking"),d=t.advancedQueryCapabilities;return a&&!(p||u||c)&&(p=u=c=!0),{supportsCalculate:o(t,"supportsCalculate",!1),supportsTruncate:o(t,"supportsTruncate",!1),supportsValidateSql:o(t,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:u,supportsEditing:a,supportsChangeTracking:y,supportsQuery:l,supportsQueryAnalytics:o(d,"supportsQueryAnalytic",!1),supportsQueryAttachments:o(d,"supportsQueryAttachments",!1),supportsQueryTopFeatures:o(d,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:o(t,"supportsAttachmentsResizing",!1),supportsSync:n.includes("sync"),supportsUpdate:c,supportsExceedsLimitStatistics:o(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:o(t,"supportsAsyncConvert3D",!1)}}function g(e,t){const r=e.advancedQueryCapabilities,l=e.ownershipBasedAccessControlForFeatures,a=e.archivingInfo,c=e.currentVersion,y=t?.includes("MapServer"),d=!y||c>=(0,n.A)("mapserver-pbf-version-support"),f=(0,i.Wo)(t),m=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:o(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:o(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:o(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(r),supportsCentroid:o(r,"supportsReturningGeometryCentroid",!1),supportsDistance:o(r,"supportsQueryWithDistance",!1),supportsDistinct:o(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:o(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:o(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:o(r,"supportsHavingClause",!1),supportsOrderBy:o(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:o(r,"supportsPagination",!1),supportsQuantization:o(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:o(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:o(e,"supportsReturningQueryGeometry",!1),supportsResultType:o(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:o(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:o(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:o(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:o(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:o(l,"allowAnonymousToQuery",!0),supportsQueryByOthers:o(l,"allowOthersToQuery",!0),supportsHistoricMoment:o(a,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:d&&m.has("pbf"),supportsDisjointSpatialRelationship:o(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:o(r,"supportsQueryWithCacheHint",!1)||u(r,"query"),supportsDefaultSpatialReference:o(r,"supportsDefaultSR",!1),supportsCompactGeometry:f,supportsFullTextSearch:o(r,"supportsFullTextSearch",!1),maxRecordCountFactor:s(e,"maxRecordCountFactor",void 0),maxRecordCount:s(e,"maxRecordCount",void 0),standardMaxRecordCount:s(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:s(e,"tileMaxRecordCount",void 0)}}function S(e){const t=e.advancedQueryCapabilities,r=o(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:o(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:u(t,"queryRelated")}}function w(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function v(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:o(e,"allowGeometryUpdates",!0),supportsGlobalId:o(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:o(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:o(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:o(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:o(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:o(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:o(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:o(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:o(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:o(r,"supportsAsyncApplyEdits",!1),zDefault:s(e,"zDefault",void 0)}}function _(e){return{operations:{supportsAppend:o(e,"supportsAppend",!1),supportsExportClip:o(e,"supportsExportClip",!1),supportsExportFrameset:o(e,"supportsExportFrameset",!1),supportsMensuration:o(e,"supportsMensuration",!1),supportsUpdate:o(e,"supportsUpdate",!1)},query:{supportsCoverageQuery:e?.playbackInfo?.klv["0601"]??!1}}}},92300:(e,t,r)=>{r.d(t,{V:()=>o,X:()=>i});var n=r(65864);function i(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function o(e,t,r){const i=(0,n.xD)(t);return e.map((e=>{const t=i.fromJSON(e);return t.spatialReference=r,t}))}},58501:(e,t,r)=>{r.d(t,{q:()=>i});var n=r(62815);function i(e,t,r){if(!r?.features||!r.hasZ)return;const i=(0,n.N)(r.geometryType,t,e.outSpatialReference);if(null!=i)for(const e of r.features)i(e.geometry)}},22671:(e,t,r)=>{r.d(t,{A:()=>w});var n,i=r(90237),o=r(59456),s=r(52106),l=r(66552),a=r(25482),p=r(4718),u=r(10107),c=(r(44208),r(53966),r(36005)),y=r(40608),d=r(43937),f=r(16930),m=r(65864),h=r(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let S=n=class extends a.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const i=e[t],o=s.A.fromJSON(i),l=i.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=r);const a=i.aggregateGeometries,p=o.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[e],n=a[e],i=n?.spatialReference;null==t||i||(t.spatialReference=r)}n.push(o)}return n}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,m.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=f.A.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,p.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e?.[r];n.geometry=t?.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,i]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,i],scale:[o,s]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,(e=>e*o+n),(e=>i-e*s),l,a);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,r){let n,i;const o=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=r(l[1]);e===n&&s===i||(o.push([e-n,s-i]),n=e,i=s)}else n=t(l[0]),i=r(l[1]),o.push([n,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,m.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=n.length;e<o;e++){const o=n[e],s=this._quantizePoints(o,t,r);s&&i.push(s)}return i.length>0?((0,m.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,m.Bi)(e)?e.rings:e.paths;let s,l;for(let e=0,n=o.length;e<n;e++){const n=o[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(s+=i[0],l+=i[1]):(s=i[0],l=i[1]),i[0]=t(s),i[1]=r(l)}}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=i(r[3])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,l;for(let e=0,n=o.length;e<n;e++){const n=o[e];e>0?(s+=n[0],l+=n[1]):(s=n[0],l=n[1]),n[0]=t(s),n[1]=r(l)}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2]),t[3]=i(t[3])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],S.prototype,"displayFieldName",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],S.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,u.MZ)({type:[s.A],json:{write:!0}})],S.prototype,"features",void 0),(0,i._)([(0,c.w)("features")],S.prototype,"readFeatures",null),(0,i._)([(0,u.MZ)({type:[h.A],json:{write:!0}})],S.prototype,"fields",void 0),(0,i._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],S.prototype,"geometryType",void 0),(0,i._)([(0,d.K)("geometryType")],S.prototype,"writeGeometryType",null),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],S.prototype,"hasM",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],S.prototype,"hasZ",void 0),(0,i._)([(0,u.MZ)({types:o.yR,json:{write:!0}})],S.prototype,"queryGeometry",void 0),(0,i._)([(0,c.w)("queryGeometry")],S.prototype,"readQueryGeometry",null),(0,i._)([(0,u.MZ)({type:f.A,json:{write:!0}})],S.prototype,"spatialReference",void 0),(0,i._)([(0,d.K)("spatialReference")],S.prototype,"writeSpatialReference",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],S.prototype,"transform",void 0),S=n=(0,i._)([(0,y.$)("esri.rest.support.FeatureSet")],S),S.prototype.toJSON.isDefaultToJSON=!0;const w=S},2272:(e,t,r)=>{r.d(t,{Dl:()=>s,jV:()=>o,lF:()=>l}),r(92602),r(70333);var n=r(4718),i=r(84952);function o(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function s(e){return"string"==typeof e?(0,i.An)(e):(0,n.o8)(e)}function l(e,t,r){const n={};for(const i in e){if("declaredClass"===i)continue;const o=e[i];if(null!=o&&"function"!=typeof o)if(Array.isArray(o))n[i]=o.map((e=>l(e)));else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(r?.[i]);n[i]=t?e:JSON.stringify(e)}else n[i]=t?o:JSON.stringify(o);else n[i]=o}return n}r(926)},59868:(e,t,r)=>{r.d(t,{A7:()=>p,Cx:()=>u,Hk:()=>c,UK:()=>a}),r(44208);var n=r(94985),i=r(31593),o=r(53930),s=r(68249),l=r(93470);const a=o.A.fromJSON(l.Cb),p=i.A.fromJSON(l.yM),u=n.A.fromJSON(l.WR),c=s.A.fromJSON(l.JZ);o.A.fromJSON(l.nC),i.A.fromJSON(l.HW),n.A.fromJSON(l.b6)},93470:(e,t,r)=>{r.d(t,{Cb:()=>i,HW:()=>p,JZ:()=>l,WR:()=>s,b6:()=>u,nC:()=>a,yM:()=>o});const n=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2764],{9775:(e,t,n)=>{n.d(t,{A:()=>i});var s=n(62788),r=n(95488);class i{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new r.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,n)=>{n.d(t,{w:()=>o});var s=n(4576),r=n(3694),i=n(11006);class o{constructor(e=9,t){this._compareMinX=u,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),x.prune(),v.prune(),M.prune()}all(e){a(this._data,e)}search(e,t){let n=this._data;const s=this._toBBox;if(_(e,n))for(b.clear();n;){for(let r=0,i=n.children.length;r<i;r++){const i=n.children[r],o=n.leaf?s(i):i;_(e,o)&&(n.leaf?t(i):g(e,o)?a(i,t):b.push(i))}n=b.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!_(e,t))return!1;for(b.clear();t;){for(let s=0,r=t.children.length;s<r;s++){const r=t.children[s],i=t.leaf?n(r):r;if(_(e,i)){if(t.leaf||g(e,i))return!0;b.push(r)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new A([]),this}remove(e){if(!e)return this;let t,n=this._data,r=null,i=0,o=!1;const a=this._toBBox(e);for(v.clear(),M.clear();n||v.length>0;){if(n||(n=v.pop(),r=v.data[v.length-1],i=M.pop()??0,o=!0),n.leaf&&(t=(0,s.qh)(n.children,e,n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),v.push(n),this._condense(v),this;o||n.leaf||!g(n,a)?r?(i++,n=r.children[i],o=!1):n=null:(v.push(n),M.push(i),i=0,r=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,s){const r=n-t+1;let i=this._maxEntries;if(r<=i){const s=new A(e.slice(t,n+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(r)/Math.log(i)),i=Math.ceil(r/i**(s-1)));const o=new S([]);o.height=s;const a=Math.ceil(r/i),h=a*Math.ceil(Math.sqrt(i));w(e,t,n,h,this._compareMinX);for(let r=t;r<=n;r+=h){const t=Math.min(r+h-1,n);w(e,r,t,a,this._compareMinY);for(let n=r;n<=t;n+=a){const r=Math.min(n+a-1,t);o.children.push(this._build(e,n,r,s-1))}}return l(o,this._toBBox),o}_insert(e,t,n){const s=this._toBBox,r=n?e:s(e);v.clear();const i=function(e,t,n,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==n;){let n,s=1/0,r=1/0;for(let i=0,o=t.children.length;i<o;i++){const o=t.children[i],a=c(o),l=y(e,o)-a;l<r?(r=l,s=a<s?a:s,n=o):l===r&&a<s&&(s=a,n=o)}t=n||t.children[0]}return t}(r,this._data,t,v);for(i.children.push(e),p(i,r);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;!function(e,t,n){for(let s=n;s>=0;s--)p(t.data[s],e)}(r,v,t)}_split(e,t){const n=e.data[t],s=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,s);const i=this._chooseSplitIndex(n,r,s);if(!i)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=n.children.splice(i,n.children.length-i),a=n.leaf?new A(o):new S(o);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new S([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let s,r,i;s=r=1/0;for(let o=t;o<=n-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,n,this._toBBox),l=f(t,a),p=c(t)+c(a);l<s?(s=l,i=o,r=p<r?p:r):l===s&&p<r&&(r=p,i=o)}return i}_chooseSplitAxis(e,t,n){const s=e.leaf?this._compareMinX:u,r=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,n,s)<this._allDistMargin(e,t,n,r)&&e.children.sort(s)}_allDistMargin(e,t,n,s){e.children.sort(s);const r=this._toBBox,i=h(e,0,t,r),o=h(e,n-t,n,r);let a=m(i)+m(o);for(let s=t;s<n-t;s++){const t=e.children[s];p(i,e.leaf?r(t):t),a+=m(i)}for(let s=n-t-1;s>=t;s--){const t=e.children[s];p(o,e.leaf?r(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const r=e.data[t-1],i=r.children;i.splice((0,s.qh)(i,n,i.length,r.indexHint),1)}else this.clear();else l(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let n=e;for(x.clear();n;){if(!0===n.leaf)for(const e of n.children)t(e);else x.pushArray(n.children);n=x.pop()??null}}function l(e,t){h(e,0,e.children.length,t,e)}function h(e,t,n,s,r){r||(r=new A([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let i,o=t;o<n;o++)i=e.children[o],p(r,e.leaf?s(i):i);return r}function p(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function u(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(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 n=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),i=Math.min(e.maxY,t.maxY);return Math.max(0,r-n)*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 w(e,t,n,s,r){const o=[t,n];for(;o.length;){const t=o.pop(),n=o.pop();if(t-n<=s)continue;const a=n+Math.ceil((t-n)/s/2)*s;(0,i.q)(e,a,n,t,r),o.push(n,a,a,t)}}const b=new r.A,x=new r.A,v=new r.A,M=new r.A({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class I extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class A extends I{constructor(e){super(),this.children=e,this.leaf=!0}}class S extends I{constructor(e){super(),this.children=e,this.leaf=!1}}},39516:(e,t,n)=>{async function s(e,t){const{WhereClause:s}=await Promise.all([n.e(835),n.e(4800)]).then(n.bind(n,50835));return s.create(e,t)}function r(e,t){return"1=1"===e?t:"1=1"===t?e:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}n.d(t,{G:()=>s,m:()=>r})},10382:(e,t,n)=>{n.d(t,{A:()=>h});var s=n(36563),r=n(74887),i=n(9775),o=n(72457),a=n(52268),l=n(61322);class h{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new i.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((n,s)=>{let i=!0;const o=e=>{(0,r.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,r.$X)(a)?this._clientPromises[i]=a.then((e=>(this._clients[i]=new l.default(e,t,this._ongoingJobsQueue),o(n),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(n))}}))}broadcast(e,t,n){const s=new Array(this._clientPromises.length);for(let r=0;r<this._clientPromises.length;++r){const i=this._clientPromises[r];s[r]=i.then((s=>s?.invoke(e,t,n)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,r.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.h)(this)}invoke(e,t,n){return this.apply(e,[t],n)}apply(e,t,n){const s=(0,r.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:n,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((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((r=>{r&&(t[s]=r.openPort()),0==--n&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},72457:(e,t,n)=>{n.d(t,{h:()=>i,k:()=>r});const s=new FinalizationRegistry((e=>{e.close()}));function r(e,t){s.register(e,t,t)}function i(e){s.unregister(e)}},29953:(e,t,n)=>{n.d(t,{ho:()=>Z});var s=n(49186),r=n(44208),i=n(74887),o=n(10382),a=n(72457),l=n(61322),h=n(53966),p=n(97768),u=n(78888),d=n(84952);const c={async request(e,t){const n=e.options,s=n.responseType;n.signal=t?.signal,n.responseType="native"===s||"native-request-init"===s?"native-request-init":s&&["blob","json","text"].includes(s)&&(0,d.sC)(e.url)?.after?s:"array-buffer";const r=await(0,u.A)(e.url,n),i={data:r.data,httpStatus:r.httpStatus,ssl:r.ssl};switch(r.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 m=n(8341),y=n(2741),f=n(92602),g=(n(47566),n(70333));const _={};var w=n(26390);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...n)=>e[t](...n)}))}}class x{constructor(){this._dispatcher=new b,this._workerPostMessage({type:m.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,w.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,n){this._dispatcher.addEventListener(e,t,n)}removeEventListener(e,t,n){this._dispatcher.removeEventListener(e,t,n)}_workerPostMessage(e){(0,w.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,m.VI)(e);if(t&&t.type===m.Go.OPEN){const{modulePath:e,jobId:n}=t;let s=await l.default.loadWorker(e);s||(s=await import(e));const r=l.default.connect(s);this._workerPostMessage({type:m.Go.OPENED,jobId:n,data:r})}}}var v=n(73444),M=n(18357);const T=()=>h.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:I}=m.Go;let A,S;const E="Failed to create Worker. Fallback to execute module in main thread";async function k(e){return new Promise((t=>{function n(r){const i=(0,m.VI)(r);i&&i.type===I&&(e.removeEventListener("message",n),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",n),e.removeEventListener("error",s),T().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new x).addEventListener("message",n),e.addEventListener("error",s)}e.addEventListener("message",n),e.addEventListener("error",s)}))}let N=0;const{ABORT:R,INVOKE:L,OPEN:D,OPENED:C,RESPONSE:j}=m.Go;class O{static async create(e){const t=await async function(){if(!(0,r.A)("esri-workers"))return k(new x);if(!A&&!S)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++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,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,d.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,d.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,v.JK)(),e.has={"esri-csp-restrictions":(0,r.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,r.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,r.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,r.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,r.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,r.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,r.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,r.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,r.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,r.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,r.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,r.A)("esri-atomics"),"esri-shared-array-buffer":(0,r.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,r.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,r.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,r.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,d.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,d.s2)(e.workers.workerPath):e.workers.workerPath=(0,d.s2)((0,y.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.A.workers.loaderConfig,n=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{..._.paths,...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=_.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,v.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:M.$,fullVersion:g.ol,revision:M.u};return JSON.stringify({esriConfig:e,loaderConfig:n,kernelInfo:s})}());A=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){S=e||{}}let e;if(A)try{e=new Worker(A,{name:"esri-worker-"+N++})}catch(t){T().warn(E,S),e=new x}else T().warn(E,S),e=new x;return k(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(),h.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:n}=t,s=(0,m.Jc)();return new Promise(((t,r)=>{const o={resolve:t,reject:r,abortHandle:(0,i.NY)(n,(()=>{this._outJobs.delete(s),this._post({type:R,jobId:s})}))};this._outJobs.set(s,o),this._post({type:D,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,m.VI)(e);if(t)switch(t.type){case C:this._onOpenedMessage(t);break;case j:this._onResponseMessage(t);break;case R:this._onAbortMessage(t);break;case L:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,n=e.jobId,s=t.get(n);s&&(s.controller&&s.controller.abort(),t.delete(n))}_onInvokeMessage(e){const{methodName:t,jobId:n,data:s,abortable:r}=e,o=r?new AbortController:null,a=this._inJobs,l=c[t];let h;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);h=l.call(null,s,{signal:o?o.signal:null})}catch(e){return void this._post({type:j,jobId:n,error:(0,m.mF)(e)})}(0,i.$X)(h)?(a.set(n,{controller:o,promise:h}),h.then((e=>{a.has(n)&&(a.delete(n),this._post({type:j,jobId:n},e))}),(e=>{a.has(n)&&(a.delete(n),e||(e={message:"Error encountered at method"+t}),(0,i.zf)(e)||this._post({type:j,jobId:n,error:(0,m.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:j,jobId:n},h)}_onOpenedMessage(e){const{jobId:t,data:n}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,p.xt)(s.abortHandle),s.resolve(n))}_onResponseMessage(e){const{jobId:t,error:n,data:r}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,p.xt)(i.abortHandle),n?i.reject(s.A.fromJSON(JSON.parse(n))):i.resolve(r))}_post(e,t,n){return(0,m.u1)(this.worker,e,t,n)}}const B=(0,r.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,r.A)("workers-pool-size")):0;let P=(0,r.A)("esri-mobile")?Math.min(B,3):B;P||(P=(0,r.A)("safari")&&(0,r.A)("mac")?7:2);let F=0;const q=[];async function J(e,t){const n=new o.A,{registryTarget:s,...r}=t;return await n.open(e,r),s&&(0,a.k)(s,n),n}async function Z(e,t={}){if("string"!=typeof e)throw new s.A("workers:undefined-module","modulePath is missing");let n=t.strategy||"distributed";if((0,r.A)("host-webworker")&&!(0,r.A)("esri-workers")&&(n="local"),"local"===n){let n=await l.default.loadWorker(e);n||(n=await import(e)),(0,i.Te)(t.signal);const s=t.client||n;return J([l.default.connect(n,t.schedule)],{...t,client:s})}if(await async function(){if($)return $;G=new AbortController;const e=[];for(let t=0;t<P;t++){const n=O.create(t).then((e=>(q[t]=e,e)));e.push(n)}return $=Promise.all(e),$}(),(0,i.Te)(t.signal),"dedicated"===n){const n=F++%P;return J([await q[n].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const n=Math.min(t.maxNumWorkers,P);if(n<P){const s=new Array(n);for(let r=0;r<n;++r){const n=F++%P;s[r]=q[n].open(e,t)}return J(s,t)}}return J(q.map((n=>n.open(e,t))),t)}let G,$=null},17136:(e,t,n)=>{n.d(t,{el:()=>v});var s=n(92602),r=n(49186),i=n(53966),o=n(39829),a=n(82799),l=n(80754),h=n(21325),p=n(28735),u=(n(59456),n(78888)),d=n(65864),c=n(2272),m=n(84952),y=n(92300);const f=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function w(e,t,n){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw f().error(e),new r.A(e)}const n=(0,l.r8)(e),s=[];for(const e of n){const n=[];s.push(n),n.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const r=e[s][0],i=e[s][1],o=e[s+1][0],a=e[s+1][1],l=Math.sqrt((o-r)*(o-r)+(a-i)*(a-i)),h=(a-i)/l,p=(o-r)/l,u=l/t;if(u>1){for(let e=1;e<=u-1;e++){const s=e*t,o=p*s+r,a=h*s+i;n.push([o,a])}const e=(l+Math.floor(u-1)*t)/2,s=p*e+r,o=h*e+i;n.push([s,o])}n.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:s,spatialReference:e.spatialReference}):new a.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return n&&(e=(0,l.kS)(e,n)),e}function b(e,t,n){if(Array.isArray(e)){const s=e[0];if(s>t){const n=(0,l.kd)(s,t);e[0]=s+n*(-2*t)}else if(s<n){const t=(0,l.kd)(s,n);e[0]=s+t*(-2*n)}}else{const s=e.x;if(s>t){const n=(0,l.kd)(s,t);e=e.clone().offset(n*(-2*t),0)}else if(s<n){const t=(0,l.kd)(s,n);e=e.clone().offset(t*(-2*n),0)}}return e}function x(e,t){let n=-1;for(let s=0;s<t.cutIndexes.length;s++){const r=t.cutIndexes[s],i=t.geometries[s],o=(0,l.r8)(i);for(let e=0;e<o.length;e++){const t=o[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const s=t[e][0];n=s>n?s:n}n=Number(n.toFixed(9));const s=-360*(0,l.kd)(n,180);for(let n=0;n<t.length;n++){const t=i.getPoint(e,n);i.setPoint(e,n,t.clone().offset(s,0))}return!0}}))}if(r===n){if(g(e))for(const t of(0,l.r8)(i))e[r]=e[r].addRing(t);else if(_(e))for(const t of(0,l.r8)(i))e[r]=e[r].addPath(t)}else n=r,e[r]=i}return e}async function v(e,t,n){if(!Array.isArray(e))return v([e],t);t&&"string"!=typeof t&&f().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let i,g,_,M,T,I,A,S,E=0;const k=[],N=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,g=(0,h.Vp)(i),_=i.isWebMercator,I=_?102100:4326,M=l.j7[I].maxX,T=l.j7[I].minX,A=l.j7[I].plus180Line,S=l.j7[I].minus180Line),g)if("mesh"===t.type)N.push(t);else if("point"===t.type)N.push(b(t.clone(),M,T));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,M,T))),N.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);N.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,n=(0,l.kd)(e.xmin,T)*(2*M);let s=0===n?t.clone():(0,l.kS)(t.clone(),n);e.offset(n,0);let{xmin:r,xmax:i}=e;r=Number(r.toFixed(9)),i=Number(i.toFixed(9)),e.intersects(A)&&i!==M?(E=i>E?i:E,s=w(s,_),k.push(s),N.push("cut")):e.intersects(S)&&r!==T?(E=i*(2*M)>E?i*(2*M):E,s=w(s,_,360),k.push(s),N.push("cut")):N.push(s)}else N.push(t.clone());else N.push(t);else N.push(t);let R=(0,l.kd)(E,M),L=-90;const D=R,C=new a.A;for(;R>0;){const e=360*R-180;C.addPath([[e,L],[e,-1*L]]),L*=-1,R--}if(k.length>0&&D>0){const t=x(k,await async function(e,t,n,s){const r=(0,c.Dl)(e),i=t[0].spatialReference,o={...s,responseType:"json",query:{...r.query,f:"json",sr:(0,h.YX)(i),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},a=await(0,u.A)(r.path+"/cut",o),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=i,t}))}}(r,k,C,n)),s=[],i=[];for(let n=0;n<N.length;n++){const r=N[n];if("cut"!==r)i.push(r);else{const r=t.shift(),o=e[n];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&r.rings.length>=o.rings.length?(s.push(r),i.push("simplify")):i.push(_?(0,p.Gh)(r):r)}}if(!s.length)return i;const o=await async function(e,t,n){const s="string"==typeof e?(0,m.An)(e):e,r=t[0].spatialReference,i=(0,d.$B)(t[0]),o={...n,query:{...s.query,f:"json",sr:(0,h.YX)(r),geometries:JSON.stringify((0,y.X)(t))}},{data:a}=await(0,u.A)(s.path+"/simplify",o);return(0,y.V)(a.geometries,i,r)}(r,s,n),a=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?a.push(t):a.push(_?(0,p.Gh)(o.shift()):o.shift())}return a}const j=[];for(let e=0;e<N.length;e++){const t=N[e];if("cut"!==t)j.push(t);else{const e=k.shift();j.push(!0===_?(0,p.Gh)(e):e)}}return j}},80754:(e,t,n)=>{n.d(t,{j7:()=>o,kS:()=>l,kd:()=>a,r8:()=>h});var s=n(82799),r=n(16930),i=n(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=h(e);for(const e of n)for(const n of e)n[0]+=t;return e}function h(e){return(0,i.Bi)(e)?e.rings:e.paths}},6518:(e,t,n)=>{n.d(t,{F:()=>a});var s=n(44208),r=n(75503),i=n(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.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(((n,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,n){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,n)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,n)=>{n.d(t,{A:()=>m});var s=n(4576),r=n(49186),i=n(65529),o=n(53966),a=n(70328),l=n(19419),h=n(90708),p=n(6518),u=n(51441),d=n(37730);const c=(0,a.vt)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new p.F,this._featuresById=new Map,this._markedIds=new Set,this.events=new i.A,this.featureAdapter=d.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,n,s,r]=this.fullBounds;return{xmin:t,ymin:n,xmax:s,ymax:r,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 n of e){const e=this._boundsStore.get(n.objectId);e&&t((0,a.Jt)(c,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,n)=>{this._markedIds.has(n)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let s;if(this._markedIds.add(t),n?(e.displayId=n.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,h.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 r.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const n=this._featuresById.get(t);if(!n)return this._add(e),e;this._markedIds.add(t);const{geometry:s,attributes:i}=e;for(const e in i)n.attributes[e]=i[e];return s&&(n.geometry=s,this._boundsStore.set(t,(0,h.jQ)((0,l.vt)(),s,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),n}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},64714:(e,t,n)=>{n.d(t,{F0:()=>a,Vx:()=>p,e2:()=>u,f:()=>d});var s=n(44208),r=n(4718),i=n(99352),o=n(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function p(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this.${t} = null;`;for(const t in e)n+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new s}catch(n){return()=>({[t]:null,...e})}}function u(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},61184:(e,t,n)=>{n.d(t,{PB:()=>E,d4:()=>S,ZL:()=>I,sZ:()=>A,yC:()=>M,Vr:()=>T});var s=n(90237),r=(n(59456),n(69622)),i=n(49186),o=n(53966),a=n(91869),l=n(39516),h=n(10107),p=(n(44208),n(87811),n(40608)),u=n(39829),d=n(57251),c=n(21325),m=n(90708),y=n(43334),f=n(65864);class g{constructor(){this._featureLookup=new Map}static getInstance(){return g.instance||(g.instance=new g),g.instance}static resetInstance(){g.instance&&(g.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const n=this.readFromStoreById(e);n&&t.push(n)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,n){const s=[];return e.forEach((e=>{if(!e?.id)return;e.properties||(e.properties=[]);let r,i=null;if(n&&e.properties[n]&&(i=(0,m.Ux)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties.ESRI__ORIGIN_ID=e.originId,e.properties.ESRI__DESTINATION_ID=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const s=this._featureLookup.get(e.id),o=JSON.parse(JSON.stringify(Object.assign(s.attributes,e.properties)));n&&e.properties[n]&&(o[n]=(0,f.rS)(e.properties[n])),r=new y.Om(i?JSON.parse(JSON.stringify(i)):s?.geometry?JSON.parse(JSON.stringify(s.geometry)):null,o,null,e.properties[t])}else r=new y.Om(i?JSON.parse(JSON.stringify(i)):null,e.properties,null,e.properties[t]);this._featureLookup.set(e.id,r),s.push(r)})),s}}var _=n(45654),w=n(43709),b=n(42538),x=n(61956),v=n(5443);const M="ESRI__ID",T="ESRI__ORIGIN_ID",I="ESRI__DESTINATION_ID",A="ESRI__LAYOUT_GEOMETRY",S="ESRI__AGGREGATION_COUNT";let E=class extends r.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach((n=>{n.name&&(t.set(n.name,"entity"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(n.name),n.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((n=>{n.name&&(t.set(n.name,"relationship"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(n.name),n.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((n,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 r=new Map;n.members?.forEach((e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,(()=>new Set)).add(s);const t=this.getById(e.id);t&&r.set(e.id,t)})),this.sublayerCaches.set(s,r)}))}addToLayer(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new i.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const n=this.inclusionModeDefinition.namedTypeDefinitions.get(e);n.members||(n.members=new Map),n.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}))}getById(e){return g.getInstance().readFromStoreById(e)}async getData(e,t,n){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let s;if(s=e||new x.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,n=this._processingCacheUpdatesLookup.get(t.objectType.name??""),r=s.outFields;r&&1===r.length&&r[0]===M&&"1=1"===s.where||await Promise.all(n??[]);const i=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return i.forEach((n=>{this.relationshipTypeNames.has(t.objectType.name)?n.geometry=e.relationshipLinkChartDiagramLookup.get(n.attributes[t.objectIdField]):n.geometry=e.entityLinkChartDiagramLookup.get(n.attributes[t.objectIdField]),n.attributes[A]=n.geometry,o.push(n)})),o}return this.retrieveDataFromService(s,t,n)}async getConnectedRecordIds(e,t){const n=[];let s="";const r=[],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)}return i.forEach(((e,i)=>{let a;a=t&&0!==t?.length?`MATCH (n:${i})-[r:${s}]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`:`MATCH (n:${i})-[r]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`;const l=new Promise((t=>{(async()=>{const t=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new b.A({openCypherQuery:a,bindParameters:{ids:e}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:s}=await t.read();if(e)break;for(let e=0;e<s.length;e++){const t=s[e];n.push({id:t[0],typeName:t[1]}),n.push({id:t[2],typeName:t[3]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}})().then((()=>{t()}))}));r.push(l)})),this.refreshCacheContent(),await Promise.all(r),n}async refreshCacheContent(e,t,n,s=!0){const r=g.getInstance(),o=[],l=new Map,h=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&h.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&h.set(e.name,e)})),e||this.inclusionModeDefinition?e?e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))l.has(t)?l.get(t)?.push(e):l.set(t,[e])})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?l.set(t,null):e.members&&e.members.forEach((e=>{l.has(t)&&null!==l.get(t)?l.get(t)?.push(e.id):l.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,null)})));for(const[e,p]of l){const l=new Promise((o=>{(async()=>{const o=new Set,l=[];let u,d="",c=!1;if(t||h.get(e)?.properties?.forEach((e=>{e.name&&o.add(e.name)})),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&o.add(t)}if(this.entityTypeNames.has(e))d=`MATCH (n:${e}) ${p?"WHERE id(n) IN $ids ":""}return ID(n)`,o.forEach((e=>{d+=`, 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,d=`MATCH ()-[n:${e}]->() ${p?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,o.forEach((e=>{d+=`, n.${e}`,l.push(e)}))}u=new b.A(p?{openCypherQuery:d,bindParameters:{ids:p}}:{openCypherQuery:d});const m=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,u)).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await m.read();if(t)break;const i=[];for(let e=0;e<n.length;e++){const t=n[e];let s=0,r=0;const o={properties:{}};for(o.id=t[s],s++,r++,c&&(o.originId=t[s],s++,r++,o.destinationId=t[s],s++,r++,(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-r]]=t[s];i.push(o)}const o=r.writeToStore(i,M,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 h=this.sublayerCaches.get(e);o.forEach((t=>{h?.set(t.attributes[M],t),s&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[M])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[M],{id:t.attributes[M]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[M],(()=>new Set)).add(e))}))}})().then((()=>{o(null)}))}));o.push(l),this._processingCacheUpdatesLookup.get(e)?.push(l)}await Promise.all(o)}removeFromLayer(e){const t=new Set,n=new Set(e.map((e=>e.id)));for(const n of e)t.add(n.typeName),1===this.memberIdTypeLookup.get(n.id)?.size?this.memberIdTypeLookup.delete(n.id):this.memberIdTypeLookup.get(n.id)?.delete(n.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{t===n.typeName&&e.members?.has(n.id)&&e.members.delete(n.id)}));t.forEach((e=>{this.sublayerCaches.get(e)?.forEach(((t,s)=>{n.has(s)&&this.sublayerCaches.get(e)?.delete(s)}))}))}async retrieveDataFromService(e,t,n){const s=g.getInstance(),r=new Set,o=[];let a,h="",p=[];const m="relationship"===t.graphType,y=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,f=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let x=!y&&f?Array.from(f).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(x=e.objectIds);else if(null!=e.objectIds&&x&&x.length>0){const t=e.objectIds;e.objectIds=x.filter((e=>t.includes(e)))}else if(null!=e.objectIds)x=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=x}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach((e=>{r.add(e.name)})):n.forEach((e=>{e!==M&&e!==t.geometryFieldName&&r.add(e)}))}if(null!=e.geometry){const n=e.geometry;let s;const p=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,y=p?.spatialReference,f=p?.serviceCapabilities?.geometryCapabilities;let g=f?.geometryMaxBoundingRectangleSizeX,w=f?.geometryMaxBoundingRectangleSizeY;if(n?.extent?.spatialReference&&!n.spatialReference?.isWGS84?(await(0,d.initializeProjection)(n.extent.spatialReference,c.KK),s=(0,d.project)(n.extent,c.KK)):s=n.extent,g&&w&&y){if(4326!==y.wkid){const e=new v.A({spatialReference:y,xmax:g,ymax:w}),t=(0,d.project)(e,c.KK);g=t.xmax,w=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>w)throw new i.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${w}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,l.G)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{n.fieldNames.includes(e.name)&&r.add(e.name)}))}h=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&&r.add(t.geometryFieldName),r.forEach((e=>{h+=`, n.${e}`,o.push(e)})),a=new b.A({openCypherQuery:h,bindParameters:{param_filter_geom:new u.A({rings:(0,_.DX)(s)})}})}else{let n="";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)&&r.add(e.name)}));const i=new Set(["column-reference","string","number","binary-expression"]),o=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const h=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`${h(e.left)} ${e.operator} ${h(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let n=e.right.value;"%"===n.charAt(0)&&(n=n.slice(1)),"%"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),t+=`'${n.toLowerCase()}')`}return t}return a=!0,""};n=h(s.parseTree),a&&(n="")}let s="";s=m?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let i=!1;x&&(i=!0,s+=" WHERE ID(n) IN $ids"),n&&(s+=i?" AND":" WHERE",s+=` ${n}`),s+=" return ID(n)",m&&(s+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach((e=>{s+=`, n.${e}`,o.push(e)})),a=new b.A(x?{openCypherQuery:s,bindParameters:{ids:x}}:{openCypherQuery:s})}const T=(await(0,w.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,n)).resultRowsStream.getReader();for(;;){const{done:e,value:n}=await T.read();if(e)break;const r=[];for(let e=0;e<n.length;e++){const t=n[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];r.push(a)}p=p.concat(s.writeToStore(r,M,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return p}};(0,s._)([(0,h.MZ)()],E.prototype,"knowledgeGraph",void 0),(0,s._)([(0,h.MZ)()],E.prototype,"inclusionModeDefinition",void 0),(0,s._)([(0,h.MZ)()],E.prototype,"entityTypeNames",void 0),(0,s._)([(0,h.MZ)()],E.prototype,"relationshipTypeNames",void 0),(0,s._)([(0,h.MZ)()],E.prototype,"geographicLookup",void 0),(0,s._)([(0,h.MZ)()],E.prototype,"sublayerCaches",void 0),(0,s._)([(0,h.MZ)()],E.prototype,"nodeConnectionsLookup",void 0),(0,s._)([(0,h.MZ)()],E.prototype,"relationshipConnectionsLookup",void 0),(0,s._)([(0,h.MZ)()],E.prototype,"memberIdTypeLookup",void 0),E=(0,s._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],E)},70643:(e,t,n)=>{n.d(t,{A:()=>C});var s=n(90237),r=(n(59456),n(13874)),i=(n(86162),n(94409),n(65345),n(42980),n(39290),n(92438),n(96576),n(93618),n(65494)),o=n(15036),a=(n(29953),n(10107)),l=(n(44208),n(53966),n(87811),n(40608)),h=n(57251),p=n(21325),u=n(4146),d=n(83221),c=n(17970),m=n(64714),y=n(61184);const f=(0,n(17036).p)(),g=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,s._)([(0,a.MZ)(f.fields)],t.prototype,"fields",void 0),(0,s._)([(0,a.MZ)(f.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,s._)([(0,l.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};var _=n(63074),w=n(81149),b=n(54310),x=n(25036),v=n(10873),M=n(20437),T=n(30524),I=n(22671),A=n(61956),S=n(30291),E=n(61322),k=n(5443),N=n(39829),R=n(82799),L=n(50498);let D=class extends((0,w.J)(g((0,_.d)((0,x.j)((0,b.J)(u.A)))))){constructor(e){if(super(e),this.capabilities=(0,m.f)(!1,!1),this.definitionExpression="",this.displayField="",this.elevationInfo=null,this.geometryType=null,this.geometryFieldName=null,this.graphType=null,this.hasM=!1,this.hasZ=!1,this.labelsVisible=null,this.labelingInfo=null,this.objectIdField=y.yC,this.objectType=null,this.parentCompositeLayer=null,this.popupEnabled=!0,this.popupTemplate=null,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new E.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const n=A.A.fromJSON(e);return this.queryFeaturesJSON(n,t)}}}),[e.port2]}))},this.type="knowledge-graph-sublayer","link-chart"===e.parentCompositeLayer.type)"relationship"===e.graphType?this.geometryType="polyline":this.geometryType="point",this.geometryFieldName=y.sZ;else if(e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType&&"esriGeometryNull"!==e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType){const t=e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name);this.geometryFieldName=t?.name??null,this.geometryType=t?.geometryType?L.g.fromJSON(t.geometryType):null;const n=t?.name,s=n?e.objectType.properties?.[n]:null;s?(this.hasM=s.hasM??!1,this.hasZ=s.hasZ??!1):(this.hasM=!1,this.hasZ=!1)}else this.geometryType=null;e.objectType.properties?.forEach((e=>{let t=e.fieldType;"esriFieldTypeOID"===t&&(t="esriFieldTypeInteger"),this.fields.push(M.A.fromJSON({name:e.name,type:t,alias:e.alias,defaultValue:null,editable:e.editable,nullable:e.nullable}))})),this.fields.push(M.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1})),this.fields.push(M.A.fromJSON({name:y.d4,type:"esriFieldTypeInteger",alias:y.d4,editable:!1})),this._set("fields",[...this.fields]),e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel?.spatialReference&&(this.spatialReference=e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel.spatialReference),"link-chart"===e.parentCompositeLayer.type?"relationship"===e.graphType?this.renderer=(0,i.r)((0,m.F0)(L.g.toJSON("polyline")).renderer):this.renderer=(0,i.r)((0,m.F0)(L.g.toJSON("point")).renderer):this.renderer=(0,i.r)((0,m.F0)(L.g.toJSON(this.geometryType)).renderer)}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,T.yp)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,S.tn)(this,e)}createQuery(){return new A.A({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];return null}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:n,queryEngine:s}=await this._setupQueryObjects(e),r=I.A.fromJSON(await s.executeQuery(n.toJSON(),t?.signal));return r.features.forEach((e=>{e.sourceLayer=this})),r}async queryFeaturesJSON(e,t){const{resolvedQuery:n,queryEngine:s}=await this._setupQueryObjects(e);return await s.executeQuery(n.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:n,queryEngine:s}=await this._setupQueryObjects(e);return s.executeQueryForCount(n.toJSON(),t?.signal)}async queryExtent(e={},t){const n={...e,returnGeometry:!0},{resolvedQuery:s,queryEngine:r}=await this._setupQueryObjects(n),i=await r.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 k.A(i.extent):new k.A,{count:i.count,extent:o}}async queryObjectIds(e,t){const n=A.A.from(e);let s;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)s=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);s=this.loadQueryEngine(e)}return s.executeQueryForIds(n.toJSON(),t?.signal)}loadQueryEngine(e){const t=new d.A({geometryType:L.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=new c.d({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:L.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new A.A({where:"1=1",outFields:[y.yC]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const n=A.A.from(e),s=n.geometry;let r;if(s&&!s.spatialReference?.isWGS84&&(await(0,h.initializeProjection)(s.spatialReference,p.KK),n.geometry=(0,h.project)(s instanceof N.A||s instanceof R.A?s:s.extent,p.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)r=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);r=this.loadQueryEngine(e)}return{resolvedQuery:n,queryEngine:r}}};(0,s._)([(0,a.MZ)()],D.prototype,"capabilities",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],D.prototype,"defaultPopupTemplate",null),(0,s._)([(0,a.MZ)()],D.prototype,"definitionExpression",void 0),(0,s._)([(0,a.MZ)()],D.prototype,"displayField",void 0),(0,s._)([(0,a.MZ)()],D.prototype,"elevationInfo",void 0),(0,s._)([(0,a.MZ)()],D.prototype,"geometryType",void 0),(0,s._)([(0,a.MZ)()],D.prototype,"geometryFieldName",void 0),(0,s._)([(0,a.MZ)()],D.prototype,"graphType",void 0),(0,s._)([(0,a.MZ)()],D.prototype,"hasM",void 0),(0,s._)([(0,a.MZ)()],D.prototype,"hasZ",void 0),(0,s._)([(0,a.MZ)()],D.prototype,"labelsVisible",void 0),(0,s._)([(0,a.MZ)()],D.prototype,"labelingInfo",void 0),(0,s._)([(0,a.MZ)()],D.prototype,"objectIdField",void 0),(0,s._)([(0,a.MZ)()],D.prototype,"objectType",void 0),(0,s._)([(0,a.MZ)()],D.prototype,"parentCompositeLayer",void 0),(0,s._)([(0,a.MZ)(v.M6)],D.prototype,"popupEnabled",void 0),(0,s._)([(0,a.MZ)({type:r.A,json:{name:"popupInfo",write:!0}})],D.prototype,"popupTemplate",void 0),(0,s._)([(0,a.MZ)({types:o.H,json:{write:{target:"layerDefinition.drawingInfo.renderer"}}})],D.prototype,"renderer",null),(0,s._)([(0,a.MZ)()],D.prototype,"source",void 0),(0,s._)([(0,a.MZ)({json:{read:!1}})],D.prototype,"type",void 0),D=(0,s._)([(0,l.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],D);const C=D},45654:(e,t,n)=>{n.d(t,{DX:()=>y,aq:()=>f}),n(78888);var s,r,i,o,a,l,h,p,u,d=n(49186),c=(n(90708),n(43709)),m=n(42538);function y(e){if(!e.spatialReference.isWGS84)throw new d.A("knowledge-graph:layer-support-utils","The extentToInBoundsRings function only supports WGS84 spatial references.");let t;return t=e.xmax>180&&e.xmin<180?[[[e.xmin,e.ymin],[e.xmin,e.ymax],[180,e.ymax],[180,e.ymin],[e.xmin,e.ymin]],[[-180,e.ymin],[-180,e.ymax],[e.xmax-360,e.ymax],[e.xmax-360,e.ymin],[-180,e.ymin]]]:e.xmax>180&&e.xmin>180?[[[e.xmin-360,e.ymin],[e.xmin-360,e.ymax],[e.xmax-360,e.ymax],[e.xmax-360,e.ymin],[e.xmin-360,e.ymin]]]:e.xmax>-180&&e.xmin<-180?[[[e.xmin+360,e.ymin],[e.xmin+360,e.ymax],[180,e.ymax],[180,e.ymin],[e.xmin+360,e.ymin]],[[-180,e.ymin],[-180,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[-180,e.ymin]]]:e.xmax<-180&&e.xmin<-180?[[[e.xmin+360,e.ymin],[e.xmin+360,e.ymax],[e.xmax+360,e.ymax],[e.xmax+360,e.ymin],[e.xmin+360,e.ymin]]]:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]],t}async function f(e,t){const n=[],s=new Map,r=[];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 m.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}});r.push((0,c.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)n.push({id:e[0],typeName:e[1]}),n.push({id:e[2],typeName:e[3]})}})))}return await Promise.all(r),n}n(59456),n(16930),(r=s||(s={})).ELEMENTUID="ELEMENTUID",r.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={})),n(45724),n(35448),(u=a||(a={}))[u.featureResult=0]="featureResult",u[u.countResult=1]="countResult",u[u.idsResult=2]="idsResult",function(e){e[e.upperLeft=0]="upperLeft",e[e.lowerLeft=1]="lowerLeft"}(l||(l={})),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"}(h||(h={})),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"}(p||(p={}))},54310:(e,t,n)=>{n.d(t,{J:()=>w});var s=n(90237),r=n(53966),i=n(74887),o=n(10107),a=n(79901),l=(n(87811),n(44208),n(40608)),h=n(89317),p=n(5503),u=(n(60999),n(49186),n(14012),n(80559));const d=new p.A,c=new WeakMap;function m(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&d.push(new WeakRef(e))}function y(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:y(t,e%t):0}let f=0,g=0;function _(){const e=Date.now();let t=!1;for(const n of d){const s=n.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=d.length-1;e>=0;e--)d.at(e).deref()||d.removeAt(e)}(0,u.fm)((()=>{const e=Date.now();let t=0;for(const n of d){const s=n.deref();s&&(t=y(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 w=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,i.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||m(this)}),(()=>{}))}destroy(){!function(e){const t=d.find((t=>t.deref()===e));t&&d.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=>{r.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,s._)([(0,o.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:h.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}},20437:(e,t,n)=>{n.d(t,{A:()=>f});var s,r=n(90237),i=n(66552),o=n(25482),a=n(10107),l=n(56507),h=(n(87811),n(44208),n(93223)),p=n(36005),u=n(40608),d=n(72088),c=n(98453);const m=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 y=s=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?m.fromJSON(n.fieldValueType):null}clone(){return new s({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,r._)([(0,a.MZ)({type:String,json:{write:!0}})],y.prototype,"alias",void 0),(0,r._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],y.prototype,"defaultValue",void 0),(0,r._)([(0,a.MZ)()],y.prototype,"description",void 0),(0,r._)([(0,p.w)("description")],y.prototype,"readDescription",null),(0,r._)([(0,a.MZ)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],y.prototype,"domain",void 0),(0,r._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"editable",void 0),(0,r._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],y.prototype,"length",void 0),(0,r._)([(0,a.MZ)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,r._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"nullable",void 0),(0,r._)([(0,h.e)(c.m)],y.prototype,"type",void 0),(0,r._)([(0,a.MZ)()],y.prototype,"valueType",void 0),(0,r._)([(0,p.w)("valueType",["description"])],y.prototype,"readValueType",null),(0,r._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],y.prototype,"visible",void 0),y=s=(0,r._)([(0,u.$)("esri.layers.support.Field")],y);const f=y},72088:(e,t,n)=>{n.d(t,{rS:()=>T,gK:()=>M}),n(44208);var s,r=n(90237),i=n(4718),o=n(10107),a=(n(53966),n(93223)),l=n(40608),h=n(25482);n(87811);let p=s=class extends h.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new s({name:this.name,code:this.code})}};(0,r._)([(0,o.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,r._)([(0,o.MZ)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=s=(0,r._)([(0,l.$)("esri.layers.support.CodedValue")],p);const u=new(n(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends h.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,r._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,r._)([(0,a.e)(u)],d.prototype,"type",void 0),d=(0,r._)([(0,l.$)("esri.layers.support.Domain")],d);const c=d;var m;let y=m=class extends c{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new m({codedValues:(0,i.o8)(this.codedValues),name:this.name})}};(0,r._)([(0,o.MZ)({type:[p],json:{write:!0}})],y.prototype,"codedValues",void 0),(0,r._)([(0,a.e)({codedValue:"coded-value"})],y.prototype,"type",void 0),y=m=(0,r._)([(0,l.$)("esri.layers.support.CodedValueDomain")],y);const f=y;var g;n(49186);let _=g=class extends c{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,r._)([(0,a.e)({inherited:"inherited"})],_.prototype,"type",void 0),_=g=(0,r._)([(0,l.$)("esri.layers.support.InheritedDomain")],_);const w=_;var b;let x=b=class extends c{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new b({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],x.prototype,"maxValue",void 0),(0,r._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],x.prototype,"minValue",void 0),(0,r._)([(0,a.e)({range:"range"})],x.prototype,"type",void 0),x=b=(0,r._)([(0,l.$)("esri.layers.support.RangeDomain")],x);const v=x,M={key:"type",base:c,typeMap:{range:x,"coded-value":f,inherited:w}};function T(e){if(!e?.type)return null;switch(e.type){case"range":return v.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},32730:(e,t,n)=>{n.d(t,{BI:()=>f,D3:()=>m,XJ:()=>y,lc:()=>c,mX:()=>_,rU:()=>g,tH:()=>M});var s=n(799);const r="__begin__",i="__end__",o=new RegExp(r,"ig"),a=new RegExp(i,"ig"),l=new RegExp("^"+r,"i"),h=new RegExp(i+"$","i"),p='"',u=p+" + ",d=" + "+p;function c(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function m(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=c(e.labelExpression),t.type="conventional"),t}function f(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return _(t.expression);case"arcade":return t.expression}return null}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return M(t.expression)}return null}function _(e){let t;return e?(t=(0,s.HC)(e,(e=>r+'$feature["'+e+'"]'+i)),t=l.test(t)?t.replace(l,""):p+t,t=h.test(t)?t.replace(h,""):t+p,t=t.replaceAll(o,u).replaceAll(a,d)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,x=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function M(e){if(!e)return null;let t=b.exec(e)||x.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}},92300:(e,t,n)=>{n.d(t,{V:()=>i,X:()=>r});var s=n(65864);function r(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function i(e,t,n){const r=(0,s.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=n,t}))}},25927:(e,t,n)=>{n.d(t,{A:()=>h});var s=n(90237),r=(n(59456),n(10107)),i=(n(44208),n(53966),n(87811),n(40608)),o=n(54238),a=n(86738);let l=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,s._)([(0,r.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.Entity")],l);const h=l},54238:(e,t,n)=>{n.d(t,{A:()=>l});var s=n(90237),r=n(10107),i=(n(44208),n(53966),n(87811),n(40608)),o=n(77901);let a=class extends o.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,s._)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,s._)([(0,r.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,n)=>{n.d(t,{A:()=>l});var s=n(90237),r=n(25482),i=n(10107),o=(n(44208),n(53966),n(87811),n(40608));let a=class extends r.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,n)=>{n.d(t,{A:()=>p});var s=n(90237),r=n(10107),i=(n(44208),n(53966),n(87811),n(40608)),o=n(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,s._)([(0,r.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQuery")],a);const l=a;let h=class extends l{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null}};(0,s._)([(0,r.MZ)()],h.prototype,"bindParameters",void 0),(0,s._)([(0,r.MZ)()],h.prototype,"bindGeometryQuantizationParameters",void 0),(0,s._)([(0,r.MZ)()],h.prototype,"outputQuantizationParameters",void 0),(0,s._)([(0,r.MZ)()],h.prototype,"outputSpatialReference",void 0),h=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],h);const p=h},40662:(e,t,n)=>{n.d(t,{A:()=>a});var s=n(90237),r=(n(53966),n(44208),n(87811),n(49186),n(40608)),i=n(77901);let o=class extends i.A{constructor(e){super(e)}};o=(0,s._)([(0,r.$)("esri.rest.knowledgeGraph.ObjectValue")],o);const a=o},42095:(e,t,n)=>{n.d(t,{A:()=>h});var s=n(90237),r=n(25482),i=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),a=n(77901);let l=class extends r.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 h=l},23150:(e,t,n)=>{n.d(t,{A:()=>h});var s=n(90237),r=(n(59456),n(10107)),i=(n(44208),n(53966),n(87811),n(40608)),o=n(54238),a=n(82799);let l=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,s._)([(0,r.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,s._)([(0,r.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,s._)([(0,r.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.Relationship")],l);const h=l},22671:(e,t,n)=>{n.d(t,{A:()=>w});var s,r=n(90237),i=n(59456),o=n(52106),a=n(66552),l=n(25482),h=n(4718),p=n(10107),u=(n(44208),n(53966),n(36005)),d=n(40608),c=n(43937),m=n(16930),y=n(65864),f=n(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=s=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const n=m.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const r=e[t],i=o.A.fromJSON(r),a=r.geometry?.spatialReference;null==i.geometry||a||(i.geometry.spatialReference=n);const l=r.aggregateGeometries,h=i.aggregateGeometries;if(l&&null!=h)for(const e in h){const t=h[e],s=l[e],r=s?.spatialReference;null==t||r||(t.spatialReference=n)}s.push(i)}return s}writeGeometryType(e,t,n,s){if(e)return void g.write(e,t,n,s);const{features:r}=this;if(r)for(const e of r)if(null!=e?.geometry)return void g.write(e.geometry.type,t,n,s)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,s=(0,y.rS)(e);return s&&!n&&t.spatialReference&&(s.spatialReference=m.A.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,h.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let n=0;n<t.features.length;n++){const s=t.features[n];if(s.geometry){const t=e?.[n];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,n],translate:[s,r]}=e,i=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((r-e)/n)));for(let e=0,t=i.length;e<t;e++)o?.(i[e].geometry)||(i.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[s,r],scale:[i,o]}=n;let a=null,l=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;a=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;l=n=>null==n?n:n*t+e}const h=this._getHydrationFunction(e,(e=>e*i+s),(e=>r-e*o),a,l);for(const{geometry:e}of t)null!=e&&h&&h(e);return this.transform=null,this}_quantizePoints(e,t,n){let s,r;const i=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=n(a[1]);e===s&&o===r||(i.push([e-s,o-r]),s=e,r=o)}else s=t(a[0]),r=n(a[1]),i.push([s,r])}return i.length>0?i:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,y.Bi)(e)?e.rings:e.paths,r=[];for(let e=0,i=s.length;e<i;e++){const i=s[e],o=this._quantizePoints(i,t,n);o&&r.push(o)}return r.length>0?((0,y.Bi)(e)?e.rings=r:e.paths=r,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,n);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,s,r){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const i=(0,y.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,s=i.length;e<s;e++){const s=i[e];for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(o+=r[0],a+=r[1]):(o=r[0],a=r[1]),r[0]=t(o),r[1]=n(a)}}if(s&&r)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=s(n[2]),n[3]=r(n[3])}}else if(s)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=s(n[2])}}else if(r)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),r&&null!=e.mmax&&null!=e.mmin&&(e.mmax=r(e.mmax),e.mmin=r(e.mmin))}:"multipoint"===e?e=>{const i=e.points;let o,a;for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(o+=s[0],a+=s[1]):(o=s[0],a=s[1]),s[0]=t(o),s[1]=n(a)}if(s&&r)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=s(t[2]),t[3]=r(t[3])}else if(s)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=s(t[2])}else if(r)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=r(t[2])}}:null}};(0,r._)([(0,p.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,r._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,r._)([(0,p.MZ)({type:[o.A],json:{write:!0}})],_.prototype,"features",void 0),(0,r._)([(0,u.w)("features")],_.prototype,"readFeatures",null),(0,r._)([(0,p.MZ)({type:[f.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,r._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,r._)([(0,c.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,r._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,r._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,r._)([(0,p.MZ)({types:i.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,r._)([(0,u.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,r._)([(0,p.MZ)({type:m.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,r._)([(0,c.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,r._)([(0,p.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=s=(0,r._)([(0,d.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const w=_},2272:(e,t,n)=>{n.d(t,{Dl:()=>o,jV:()=>i,lF:()=>a}),n(92602),n(70333);var s=n(4718),r=n(84952);function i(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,r.An)(e):(0,s.o8)(e)}function a(e,t,n){const s={};for(const r in e){if("declaredClass"===r)continue;const i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i))s[r]=i.map((e=>a(e)));else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(n?.[r]);s[r]=t?e:JSON.stringify(e)}else s[r]=t?i:JSON.stringify(i);else s[r]=i}return s}n(926)},59868:(e,t,n)=>{n.d(t,{A7:()=>h,Cx:()=>p,Hk:()=>u,UK:()=>l}),n(44208);var s=n(94985),r=n(31593),i=n(53930),o=n(68249),a=n(93470);const l=i.A.fromJSON(a.Cb),h=r.A.fromJSON(a.yM),p=s.A.fromJSON(a.WR),u=o.A.fromJSON(a.JZ);i.A.fromJSON(a.nC),r.A.fromJSON(a.HW),s.A.fromJSON(a.b6)},93470:(e,t,n)=>{n.d(t,{Cb:()=>r,HW:()=>h,JZ:()=>a,WR:()=>o,b6:()=>p,nC:()=>l,yM:()=>i});const s=[252,146,31,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},i={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={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},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);