@arcgis/core 4.28.1 → 4.28.3

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 (110) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/02e86a792dbe2fdec974.js +1 -0
  3. package/assets/esri/core/workers/chunks/{5386b166f2e5dc0d9143.js → 12797aa1d6a2b49abb3f.js} +1 -1
  4. package/assets/esri/core/workers/chunks/15852a47129b9e0d04c6.js +1 -0
  5. package/assets/esri/core/workers/chunks/1687431f7b233d950195.js +1 -0
  6. package/assets/esri/core/workers/chunks/{a1e16c33f1843dbdce26.js → 175bbe8a048f17dd482b.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{d0119dff8771e749436a.js → 30d3b31df52d40e5b2e6.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{768271a12dc7e1781447.js → 32fbd4355a4a649623a7.js} +1 -1
  9. package/assets/esri/core/workers/chunks/3dbc399eedd347b0fbbb.js +1 -0
  10. package/assets/esri/core/workers/chunks/{6bc1f6f8a2408fa4bb6a.js → 423672fe765083e1a0ec.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{18e0c5bfeb1aa7213dfa.js → 4363f2cc3909c9258064.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{d5fec54e98c8622349a4.js → 46ddc52fe9cdd573a614.js} +1 -1
  13. package/assets/esri/core/workers/chunks/4747741429e8ff7112bb.js +1 -0
  14. package/assets/esri/core/workers/chunks/49d958631bcd93f6333a.js +1 -0
  15. package/assets/esri/core/workers/chunks/4ae8308e5b9c7772a11f.js +1 -0
  16. package/assets/esri/core/workers/chunks/{da124ccd18d2745195fe.js → 4bd342f13002888b6467.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{7756ed853b4ba54cd081.js → 5247c00088303da7ef3b.js} +1 -1
  18. package/assets/esri/core/workers/chunks/534726130ef1698ec89e.js +1 -0
  19. package/assets/esri/core/workers/chunks/551bc697e3e17983c2bc.js +1 -0
  20. package/assets/esri/core/workers/chunks/{65d8135c89ffdd17a3c1.js → 59d3f4c0d1a43180aff3.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{2d92df1e3ba4f05e0510.js → 633b34a5817f1f719e22.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{c7bd63103f101c09b1ea.js → 6996537249869c41e736.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{41778f8c49febe1f9404.js → 6fa0cccd4f3e1fa71421.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{78e49a70193e5adea17c.js → 77f557359a5033d7e429.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{6334a8a7b671d4042108.js → 7beae29abdfae23b15cc.js} +1 -1
  26. package/assets/esri/core/workers/chunks/7cc56b132c46c5922dac.js +1 -0
  27. package/assets/esri/core/workers/chunks/80831e90fe1a52f8f982.js +1 -0
  28. package/assets/esri/core/workers/chunks/{ea9ae9d2aef01af90896.js → 80d9bb9f247ecdfa266f.js} +1 -1
  29. package/assets/esri/core/workers/chunks/846e5e51dc278bc3f80f.js +1 -0
  30. package/assets/esri/core/workers/chunks/{f73563b23fd8dc6cf2fe.js → 86df7357a2bac73c0ef4.js} +1 -1
  31. package/assets/esri/core/workers/chunks/8b541cbf82a5ba0317ee.js +1 -0
  32. package/assets/esri/core/workers/chunks/{08a98e85e86ce560d005.js → 8bd621693692050d76aa.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{630b31a205d9db7147d0.js → 8cdece03397d01767593.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{b9a726f3bbad6fd4d65a.js → 8e91be2e38010391e351.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{cbddfcf57f72428a6992.js → 90f96a2ddfb25d851d4d.js} +1 -1
  36. package/assets/esri/core/workers/chunks/91a3181071874525ed44.js +1 -0
  37. package/assets/esri/core/workers/chunks/{2304b7456ced997904f6.js → 97fd7b82eec26449977e.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{b7c81a5bbcdd94b8a7f6.js → 9979ff59a144fe1df80b.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{0422c5160491fbcf01dc.js → 9d97a20f69047d0c47cc.js} +1 -1
  40. package/assets/esri/core/workers/chunks/9f0e8dd5c9bacfc0f03c.js +1 -0
  41. package/assets/esri/core/workers/chunks/{a8e4726c1db23324eb54.js → 9fc1206ad378f0829e0a.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{09e8babe75407c2e64c4.js → a351ab5082772b267895.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{43575b9acf9819f195f9.js → a3bbf5da4f7830d2a2a1.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{b03eaba5fa75d6ef834a.js → a47f74fc959b11f029a5.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{cb4b17f5cf96a9e36781.js → a8cf23c3a55c1834178c.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{dd55151bfac60b0deaac.js → ac4636e82a103e2c27ca.js} +1 -1
  47. package/assets/esri/core/workers/chunks/ae7ba94af6d4fd97dd8b.js +1 -0
  48. package/assets/esri/core/workers/chunks/{4adf3a8c6b49c381a633.js → b0653f63745e756f55fe.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{6867ed1860afb7aac536.js → b8f3a1d887c9e054feaa.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{e06cd10b6f8f363b5131.js → bdc751a752a7ff1387de.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{70aa04b09143b7dd2ecb.js → c2199fb8f7a54a0ef18a.js} +1 -1
  52. package/assets/esri/core/workers/chunks/c3f462d11ed570482e7a.js +1 -0
  53. package/assets/esri/core/workers/chunks/{830d99e6c58a52a58973.js → c8cb5fe1d23145c4842b.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{1f87f22e00e3218661c6.js → ce53413dd3e2062e8378.js} +1 -1
  55. package/assets/esri/core/workers/chunks/de30ff1fcb6079178958.js +1 -0
  56. package/assets/esri/core/workers/chunks/e12090768e945091cc5d.js +1 -0
  57. package/assets/esri/core/workers/chunks/e3950975030412ff6e20.js +1 -0
  58. package/assets/esri/core/workers/chunks/e8b7d1c586aff229484c.js +1 -0
  59. package/assets/esri/core/workers/chunks/{710a6268de62003af825.js → e8d1f91dc97b42d0c4f6.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{6747503826bfc94bc6c0.js → eb5213ffb83d83a4dd05.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{020825b9c12f2b6386a7.js → f037e4f9877ea08ced9d.js} +1 -1
  62. package/assets/esri/core/workers/chunks/f520f093aa81d8ee1790.js +1 -0
  63. package/assets/esri/core/workers/chunks/{abcfe3bda6f40318b092.js → f7ccc6c681fc9218555c.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{eea0fb90cd5cc80de388.js → fa750885bb27bbb03e7d.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{e67c4b7ad06d8404895a.js → fab4ee57b7c5376c9ccd.js} +1 -1
  66. package/interfaces.d.ts +6 -6
  67. package/kernel.js +1 -1
  68. package/layers/StreamLayer.js +1 -1
  69. package/layers/support/LayerContingentValuesCache.js +1 -1
  70. package/layers/support/RangeDomain.js +1 -1
  71. package/layers/support/domainUtils.js +1 -1
  72. package/layers/support/fieldUtils.js +1 -1
  73. package/layers/support/labelFormatUtils.js +1 -1
  74. package/layers/support/vectorTileLayerLoader.js +1 -1
  75. package/package.json +1 -1
  76. package/renderers/support/RasterSymbolizer.js +1 -1
  77. package/support/revision.js +1 -1
  78. package/versionManagement/VersionManagementService.js +1 -1
  79. package/views/2d/engine/vectorTiles/TileManager.js +1 -1
  80. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  81. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  82. package/widgets/FeatureForm/FieldInput.js +1 -1
  83. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  84. package/widgets/FeatureForm.js +1 -1
  85. package/widgets/Search/support/layerSearchUtils.js +1 -1
  86. package/widgets/support/dataUtils.js +5 -0
  87. package/widgets/support/dateUtils.js +1 -1
  88. package/assets/esri/core/workers/chunks/02d235849ba93541d7ad.js +0 -1
  89. package/assets/esri/core/workers/chunks/0a3da4b73beeaacd4667.js +0 -1
  90. package/assets/esri/core/workers/chunks/10dc578a90e1194c8720.js +0 -1
  91. package/assets/esri/core/workers/chunks/1eb5468c7cf653338d53.js +0 -1
  92. package/assets/esri/core/workers/chunks/1f30ea1a598ddd2e5df3.js +0 -1
  93. package/assets/esri/core/workers/chunks/366cf9bba6989342e447.js +0 -1
  94. package/assets/esri/core/workers/chunks/3ac9001b19a90faf5573.js +0 -1
  95. package/assets/esri/core/workers/chunks/43f7d9366d06d69e7c50.js +0 -1
  96. package/assets/esri/core/workers/chunks/4672504d6fe649da19f2.js +0 -1
  97. package/assets/esri/core/workers/chunks/56a61a8bff08ae273de4.js +0 -1
  98. package/assets/esri/core/workers/chunks/580e7d3cbf6797a50ded.js +0 -1
  99. package/assets/esri/core/workers/chunks/6046be598e8c673eeb1f.js +0 -1
  100. package/assets/esri/core/workers/chunks/69c1c850af7ee33258e0.js +0 -1
  101. package/assets/esri/core/workers/chunks/8f7997e8e6ee9e56239f.js +0 -1
  102. package/assets/esri/core/workers/chunks/a160576f21ada91995ac.js +0 -1
  103. package/assets/esri/core/workers/chunks/a50ec5b647a160199cb2.js +0 -1
  104. package/assets/esri/core/workers/chunks/b138196d304883efd5f6.js +0 -1
  105. package/assets/esri/core/workers/chunks/b3f5e97b47e896c6008a.js +0 -1
  106. package/assets/esri/core/workers/chunks/c447f4bf0e5f012f8f9b.js +0 -1
  107. package/assets/esri/core/workers/chunks/c87e9280681c20d042b5.js +0 -1
  108. package/assets/esri/core/workers/chunks/cc86c8c88124d916e1b3.js +0 -1
  109. package/assets/esri/core/workers/chunks/d878bb6409df183ea0ce.js +0 -1
  110. package/assets/esri/core/workers/chunks/ef757269fb3fe0e74ef8.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6618,5732,447,7701],{5732:(e,t,r)=>{r.d(t,{c:()=>n,g:()=>i});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},22862:(e,t,r)=>{r.d(t,{Hg:()=>f,V7:()=>d,uD:()=>y});var n=r(92036),i=r(46791),o=r(1153);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof n.Z}function a(e){return e instanceof i.Z?Object.keys(e.items):l(e)?(0,o.vw)(e).keys():e?Object.keys(e):[]}function p(e,t){return e instanceof i.Z?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function c(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const n=a(e),i=a(t);if(0===n.length&&0===i.length)return;if(!n.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=i.filter((e=>!n.includes(e))),y=n.filter((e=>!i.includes(e))),d=n.filter((r=>i.includes(r)&&p(e,r)!==p(t,r))).concat(o,y).sort(),f=u(e);if(f&&s.has(f)&&d.length)return{type:"complete",oldValue:e,newValue:t};let h;const m=l(e)&&l(t);for(const n of d){const i=p(e,n),o=p(t,n);let s;if((m||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(r&&r[n]&&"function"==typeof r[n])s=r[n]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;s={type:"complete",oldValue:i,newValue:o}}else s="object"==typeof i&&"object"==typeof o&&u(i)===u(o)?c(i,o):{type:"complete",oldValue:i,newValue:o};null!=s&&(null!=h?h.diff[n]=s:h={type:"partial",diff:{[n]:s}})}}return h}function y(e,t){if(null==e)return!1;const r=t.split(".");let n=e;for(const e of r){if("complete"===n.type)return!0;if("partial"!==n.type)return!1;{const t=n.diff[e];if(!t)return!1;n=t}}return!0}function d(e,t){for(const r of t)if(y(e,r))return!0;return!1}function f(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},60437:(e,t,r)=>{r.d(t,{G_:()=>b,HH:()=>s,JR:()=>f,TC:()=>l,Tn:()=>c,Ue:()=>i,al:()=>o,bZ:()=>h,cS:()=>d,dp:()=>p,fS:()=>g,is:()=>m,op:()=>u,pp:()=>a,t8:()=>y});var n=r(6570);function i(e=w){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.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function u(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 d(e){return e?y(e,b):i(b)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function 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 m(e){return 6===e.length}function g(e,t,r){if(null==e||null==t)return e===t;if(!m(e)||!m(t))return!1;if(r){for(let 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(24470);const b=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];i()},16306:(e,t,r)=>{r.d(t,{aX:()=>_});var n=r(68773),i=r(20102),o=r(92604),s=r(38913),l=r(58901),a=r(73913),p=r(8744),u=r(40488),c=(r(66577),r(3172)),y=r(33955),d=r(11282),f=r(17452);async function h(e,t,r){const n="string"==typeof e?(0,f.mN)(e):e,i=t[0].spatialReference,o=(0,y.Ji)(t[0]),s={...r,query:{...n.query,f:"json",sr:(0,p.B9)(i),geometries:JSON.stringify((a=t,{geometryType:(0,y.Ji)(a[0]),geometries:a.map((e=>e.toJSON()))}))}},{data:l}=await(0,c.Z)(n.path+"/simplify",s);var a;return function(e,t,r){const n=(0,y.q9)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=r,t}))}(l.geometries,o,i)}const m=o.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function w(e,t,r){if(t){const t=function(e,t){if(!(e instanceof l.Z||e instanceof s.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new i.Z(e)}const r=(0,a.x3)(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.Z({rings:n,spatialReference:e.spatialReference}):new l.Z({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.Sx)(t,!0)}return r&&(e=(0,a.Sy)(e,r)),e}function S(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,a.XZ)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,a.XZ)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,a.XZ)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,a.XZ)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function v(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.x3)(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.XZ)(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.x3)(o))e[i]=e[i].addRing(t);else if(b(e))for(const t of(0,a.x3)(o))e[i]=e[i].addPath(t)}else r=i,e[i]=o}return e}async function _(e,t,r){if(!Array.isArray(e))return _([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i="string"==typeof t?t:t?.url??n.default.geometryServiceUrl;let o,f,g,b,C,T,x,F,O=0;const N=[],R=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,f=(0,p.C5)(o),g=o.isWebMercator,T=g?102100:4326,b=a.UZ[T].maxX,C=a.UZ[T].minX,x=a.UZ[T].plus180Line,F=a.UZ[T].minus180Line),f)if("mesh"===t.type)R.push(t);else if("point"===t.type)R.push(S(t.clone(),b,C));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>S(e,b,C))),R.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,f);R.push(e.rings?new s.Z(e):e)}else if(t.extent){const e=t.extent,r=(0,a.XZ)(e.xmin,C)*(2*b);let n=0===r?t.clone():(0,a.Sy)(t.clone(),r);e.offset(r,0),e.intersects(x)&&e.xmax!==b?(O=e.xmax>O?e.xmax:O,n=w(n,g),N.push(n),R.push("cut")):e.intersects(F)&&e.xmin!==C?(O=e.xmax*(2*b)>O?e.xmax*(2*b):O,n=w(n,g,360),N.push(n),R.push("cut")):R.push(n)}else R.push(t.clone());else R.push(t);else R.push(t);let Z=(0,a.XZ)(O,b),M=-90;const j=Z,I=new l.Z;for(;Z>0;){const e=360*Z-180;I.addPath([[e,M],[e,-1*M]]),M*=-1,Z--}if(N.length>0&&j>0){const t=v(N,await async function(e,t,r,n){const i=(0,d.en)(e),o=t[0].spatialReference,s={...n,responseType:"json",query:{...i.query,f:"json",sr:(0,p.B9)(o),target:JSON.stringify({geometryType:(0,y.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},l=await(0,c.Z)(i.path+"/cut",s),{cutIndexes:a,geometries:u=[]}=l.data;return{cutIndexes:a,geometries:u.map((e=>{const t=(0,y.im)(e);return t.spatialReference=o,t}))}}(i,N,I,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(g?(0,u.$)(i):i)}}if(!n.length)return o;const s=await h(i,n,r),l=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?l.push(t):l.push(g?(0,u.$)(s.shift()):s.shift())}return l}const A=[];for(let e=0;e<R.length;e++){const t=R[e];if("cut"!==t)A.push(t);else{const e=N.shift();A.push(!0===g?(0,u.$)(e):e)}}return A}},73913:(e,t,r)=>{r.d(t,{Sy:()=>a,UZ:()=>s,XZ:()=>l,x3:()=>p});var n=r(58901),i=r(82971),o=r(33955);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new n.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new n.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.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.oU)(e)?e.rings:e.paths}},62128:(e,t,r)=>{r.r(t),r.d(t,{default:()=>K});var n=r(43697),i=(r(66577),r(38171)),o=(r(9790),r(46791)),s=r(20102),l=r(22974),a=r(16453),p=r(78286),u=r(20941),c=r(5600),y=r(75215),d=r(71715),f=r(52011),h=r(30556),m=r(73615),g=r(24470),b=r(16306),w=r(8744),S=r(19238),v=(r(67676),r(80442),r(70921));r(92604);let _=class extends o.Z{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.Z.ofType(this.itemType.Type))(e):new o.Z(e)}};(0,n._)([(0,c.Cb)()],_.prototype,"owner",null),_=(0,n._)([(0,f.j)("esri.core.support.OwningCollection")],_);var C=r(87085),T=r(71612),x=r(72965),F=r(52421);let O=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,F.c)({Type:i.Z,ensureType:(0,y.se)(i.Z)})],O.prototype,"itemType",void 0),O=(0,n._)([(0,f.j)("esri.support.GraphicsCollection")],O);var N=r(86787);let R=class extends((0,T.h)((0,x.M)(C.Z))){constructor(e){super(e),this.elevationInfo=null,this.graphics=new O,this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}on(e,t){return super.on(e,t)}graphicChanged(e){this.emit("graphic-update",e)}};var Z,M;(0,n._)([(0,c.Cb)({type:N.Z})],R.prototype,"elevationInfo",void 0),(0,n._)([(0,c.Cb)((Z=O,M="graphics",{type:Z,cast:v.R,set(e){const t=(0,v.Z)(e,this._get(M),Z);t.owner=this,this._set(M,t)}}))],R.prototype,"graphics",void 0),(0,n._)([(0,c.Cb)({type:["show","hide"]})],R.prototype,"listMode",void 0),(0,n._)([(0,c.Cb)()],R.prototype,"screenSizePerspectiveEnabled",void 0),(0,n._)([(0,c.Cb)({readOnly:!0})],R.prototype,"type",void 0),(0,n._)([(0,c.Cb)({constructOnly:!0})],R.prototype,"internal",void 0),R=(0,n._)([(0,f.j)("esri.layers.GraphicsLayer")],R);const j=R;var I=r(92908),A=r(38009),L=r(16859),D=r(1231),J=r(20256),E=r(4095),P=r(77987),z=r(78724),V=r(82971),q=r(6570);function G(e){return"markup"===e.featureCollectionType||e.layers.some((e=>null!=e.layerDefinition.visibilityField||!Q(e)))}function Q({layerDefinition:e,featureSet:t}){const r=e.geometryType??t.geometryType;return X.find((t=>r===t.geometryTypeJSON&&e.drawingInfo?.renderer?.symbol?.type===t.identifyingSymbol.type))}function B(){return new q.Z({xmin:-180,ymin:-90,xmax:180,ymax:90})}const k=new D.Z({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),U=new D.Z({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0,length:255});let H=class extends j{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)(B(),e).geometry:(0,g.HH)(t,e):null}get fullBounds(){const e=this.layer?.spatialReference;if(!e)return null;const t=(0,g.cS)();return this.graphics.forEach((r=>{const n=null!=r.geometry?(0,m.projectOrLoad)(r.geometry,e).geometry:null;null!=n&&(0,g.jn)(t,"point"===n.type?n:n.extent,t)})),(0,g.fS)(t,g.G_)?null:t}get sublayers(){return this.graphics}};(0,n._)([(0,c.Cb)({readOnly:!0})],H.prototype,"fullExtent",null),(0,n._)([(0,c.Cb)({readOnly:!0})],H.prototype,"fullBounds",null),(0,n._)([(0,c.Cb)({readOnly:!0})],H.prototype,"sublayers",null),(0,n._)([(0,c.Cb)()],H.prototype,"layer",void 0),(0,n._)([(0,c.Cb)()],H.prototype,"layerId",void 0),(0,n._)([(0,c.Cb)({readOnly:!0})],H.prototype,"visibilityMode",void 0),H=(0,n._)([(0,f.j)("esri.layers.MapNotesLayer.MapNotesSublayer")],H);const X=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:(new J.Z).toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:(new E.Z).toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:(new P.Z).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:(new P.Z).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:(new z.Z).toJSON()}];let W=class extends((0,T.h)((0,x.M)((0,A.q)((0,L.I)((0,a.R)(C.Z)))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=V.Z.WGS84,this.sublayers=new o.Z(X.map((e=>new H({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:!G(t)&&"portal-item"!==r?.origin}}}readFeatureCollections(e,t,r){if(!G(t))return null;const n=t.layers.map((e=>{const t=new S.default;return t.read(e,r),t}));return new o.Z({items:n})}readLegacyfeatureCollectionJSON(e,t){return G(t)?(0,l.d9)(t.featureCollection):null}get fullExtent(){const e=this.spatialReference,t=(0,g.cS)();return null!=this.sublayers?this.sublayers.forEach((({fullBounds:e})=>null!=e?(0,g.jn)(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,g.jn)(t,n,t)})),(0,g.fS)(t,g.G_)?(0,m.projectOrLoad)(B(),e).geometry:(0,g.HH)(t,e)}readMinScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.minScale)return e.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.maxScale)return e.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?V.Z.fromJSON(t.layers[0].layerDefinition.spatialReference):V.Z.WGS84}readSublayers(e,t,r){if(G(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=Q(e);if(null!=l){const e=new H({id:l.id,title:t.name,layerId:o,layer:this,graphics:r.features.map((({geometry:e,symbol:t,attributes:r,popupInfo:n})=>i.Z.fromJSON({attributes:r,geometry:e,symbol:t,popupTemplate:n})))});n.push(e)}}return new o.Z(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.Z("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 X){const r=e.find((e=>t.id===e.id));this._writeMapNoteSublayer(a,r,t,i,o,u,n)}(0,p.RB)("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.d9)(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,w.fS)(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,b.aX)(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,k),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:(0,l.d9)(r.identifyingSymbol)}},id:t.layerId,geometryType:r.geometryTypeJSON,minScale:n,maxScale:i,objectIdField:"OBJECTID",fields:[k.toJSON(),U.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.Z("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.Z("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.S)(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.Cb)({readOnly:!0})],W.prototype,"capabilities",void 0),(0,n._)([(0,d.r)(["portal-item","web-map"],"capabilities",["layers"])],W.prototype,"readCapabilities",null),(0,n._)([(0,c.Cb)({readOnly:!0})],W.prototype,"featureCollections",void 0),(0,n._)([(0,d.r)(["web-map","portal-item"],"featureCollections",["layers"])],W.prototype,"readFeatureCollections",null),(0,n._)([(0,c.Cb)({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],W.prototype,"featureCollectionJSON",void 0),(0,n._)([(0,d.r)(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],W.prototype,"readLegacyfeatureCollectionJSON",null),(0,n._)([(0,c.Cb)({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],W.prototype,"featureCollectionType",void 0),(0,n._)([(0,c.Cb)({readOnly:!0})],W.prototype,"fullExtent",null),(0,n._)([(0,c.Cb)({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.Cb)({type:["show","hide","hide-children"]})],W.prototype,"listMode",void 0),(0,n._)([(0,c.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],W.prototype,"minScale",void 0),(0,n._)([(0,d.r)(["web-map","portal-item"],"minScale",["layers"])],W.prototype,"readMinScale",null),(0,n._)([(0,c.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],W.prototype,"maxScale",void 0),(0,n._)([(0,d.r)(["web-map","portal-item"],"maxScale",["layers"])],W.prototype,"readMaxScale",null),(0,n._)([(0,c.Cb)({readOnly:!0})],W.prototype,"multipointLayer",null),(0,n._)([(0,c.Cb)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],W.prototype,"operationalLayerType",void 0),(0,n._)([(0,c.Cb)({readOnly:!0})],W.prototype,"pointLayer",null),(0,n._)([(0,c.Cb)({readOnly:!0})],W.prototype,"polygonLayer",null),(0,n._)([(0,c.Cb)({readOnly:!0})],W.prototype,"polylineLayer",null),(0,n._)([(0,c.Cb)({type:V.Z})],W.prototype,"spatialReference",void 0),(0,n._)([(0,d.r)(["web-map","portal-item"],"spatialReference",["layers"])],W.prototype,"readSpatialReference",null),(0,n._)([(0,c.Cb)({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],W.prototype,"sublayers",void 0),(0,n._)([(0,d.r)("web-map","sublayers",["layers"])],W.prototype,"readSublayers",null),(0,n._)([(0,h.c)("web-map","sublayers")],W.prototype,"writeSublayers",null),(0,n._)([(0,c.Cb)({readOnly:!0})],W.prototype,"textLayer",null),(0,n._)([(0,c.Cb)()],W.prototype,"title",void 0),(0,n._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],W.prototype,"type",void 0),W=(0,n._)([(0,f.j)("esri.layers.MapNotesLayer")],W);const K=W},92908:(e,t,r)=>{r.d(t,{S:()=>i,X:()=>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}},54295:(e,t,r)=>{r.d(t,{V:()=>s});var n=r(43697),i=r(5600),o=(r(75215),r(67676),r(80442),r(52011));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.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,n._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>a});var n=r(43697),i=r(92604),o=r(5600),s=(r(75215),r(67676),r(80442),r(52011)),l=r(66677);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Nm)(e,i.Z.getLogger(this)))}};return(0,n._)([(0,o.Cb)()],t.prototype,"title",null),(0,n._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,n._)([(0,s.j)("esri.layers.mixins.ArcGISService")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>s});var n=r(43697),i=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,n._)([(0,i.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,n._)([(0,o.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>w});var n=r(43697),i=r(92604),o=r(95330),s=r(5600),l=r(90578),a=(r(67676),r(80442),r(52011)),p=r(82960),u=r(46791),c=(r(66643),r(20102),r(26258),r(87538));const y=new u.Z,d=new WeakMap;function f(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&y.push(new WeakRef(e))}function h(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:h(t,e%t):0}let m=0,g=0;function b(){const e=Date.now();let t=!1;for(const r of y){const n=r.deref();n?n.refreshInterval&&e-(d.get(n)??0)+5>=6e4*n.refreshInterval&&(d.set(n,e),n.refresh(e)):t=!0}if(t)for(let e=y.length-1;e>=0;e--)y.at(e).deref()||y.removeAt(e)}(0,c.EH)((()=>{const e=Date.now();let t=0;for(const r of y){const n=r.deref();n&&(t=h(Math.round(6e4*n.refreshInterval),t),n.refreshInterval?d.get(n)||d.set(n,e):d.delete(n))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(b,g)}}));const w=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||f(this)}),(()=>{}))}destroy(){!function(e){const t=y.find((t=>t.deref()===e));t&&y.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,o.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,n._)([(0,s.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.C}}}}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,n._)([(0,s.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,s.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,n._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(43697),i=r(2368),o=r(35454),s=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));const p=new o.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,i.J)(s.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,n._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,n._)([(0,l.Cb)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,n._)([(0,a.j)("esri.layers.support.FeatureTemplate")],u);const c=u},16451:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(43697),i=r(2368),o=r(96674),s=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),p=r(30556),u=r(72729),c=r(70082);let y=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,n._)([(0,s.Cb)({json:{write:!0}})],y.prototype,"id",void 0),(0,n._)([(0,s.Cb)({json:{write:!0}})],y.prototype,"name",void 0),(0,n._)([(0,s.Cb)({json:{write:!0}})],y.prototype,"domains",void 0),(0,n._)([(0,l.r)("domains")],y.prototype,"readDomains",null),(0,n._)([(0,p.c)("domains")],y.prototype,"writeDomains",null),(0,n._)([(0,s.Cb)({type:[c.Z],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,n._)([(0,a.j)("esri.layers.support.FeatureType")],y);const d=y},1231:(e,t,r)=>{r.d(t,{Z:()=>m});var n,i=r(43697),o=r(35454),s=r(96674),l=r(5600),a=r(75215),p=(r(67676),r(80442),r(36030)),u=r(71715),c=r(52011),y=r(72729),d=r(86719);const f=new o.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=n=class extends s.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?f.fromJSON(r.fieldValueType):null}clone(){return new n({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,i._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,i._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,i._)([(0,u.r)("description")],h.prototype,"readDescription",null),(0,i._)([(0,l.Cb)({types:y.V5,json:{read:{reader:y.im},write:!0}})],h.prototype,"domain",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,i._)([(0,l.Cb)({type:a.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],h.prototype,"length",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,i._)([(0,p.J)(d.v)],h.prototype,"type",void 0),(0,i._)([(0,l.Cb)()],h.prototype,"valueType",void 0),(0,i._)([(0,u.r)("valueType",["description"])],h.prototype,"readValueType",null),(0,i._)([(0,l.Cb)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=n=(0,i._)([(0,c.j)("esri.layers.support.Field")],h);const m=h},99514:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(20102),i=r(96674),o=r(92604),s=r(35671),l=r(25031);class a{static fromJSON(e){return new a(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new a(e.fields??[],y(e))}static fromLayerJSON(e){return new a(e.fields??[],y(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=u(t);if(t&&n){const i=p(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,s.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,s.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,s.Dl)(e)||(0,s.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,s.Dl)(e)||(0,s.Se)(e)||e.nullable||void 0!==(0,s.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(p(e))??this._normalizedFieldsMap.get(u(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.Z.getLogger("esri.layers.support.FieldsIndex").error(new n.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),l.pt):c.has(t.type)?l._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,s.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,i.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function p(e){return e.trim().toLowerCase()}function u(e){return(0,s.q6)(e)?.toLowerCase()??""}const c=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function y(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:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,l.Jv)(e.dateFieldsTimeReference):null,u=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.dateFieldsTimeReference?(0,l.Jv)(i.dateFieldsTimeReference):a??l.pt:null,y=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.timeReference?(0,l.Jv)(n.timeReference):a:null,d=new Map([[p(i?.creationDateField??""),u],[p(i?.editDateField??""),u],[p(o),y],[p(s),y]]);for(const{name:n,type:i}of e.fields)if(c.has(i))t.set(n,l._4);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(n,null);else if(r)t.set(n,l._4);else{const e=d.get(p(n??""))??a;t.set(n,e)}return t}},56765:(e,t,r)=>{r.d(t,{Z:()=>u});var n,i=r(43697),o=r(46791),s=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));let p=n=class extends s.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.Z}clone(){return new n({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,i._)([(0,l.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,i._)([(0,l.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=n=(0,i._)([(0,a.j)("esri.layers.support.LayerFloorInfo")],p);const u=p},72729:(e,t,r)=>{r.d(t,{im:()=>T,V5:()=>C}),r(80442);var n,i=r(43697),o=r(22974),s=r(5600),l=(r(75215),r(36030)),a=r(52011),p=r(96674);r(67676);let u=n=class extends p.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,s.Cb)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=n=(0,i._)([(0,a.j)("esri.layers.support.CodedValue")],u);const c=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let y=class extends p.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,l.J)(c)],y.prototype,"type",void 0),y=(0,i._)([(0,a.j)("esri.layers.support.Domain")],y);const d=y;var f;let h=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.d9)(this.codedValues),name:this.name})}};(0,i._)([(0,s.Cb)({type:[u],json:{write:!0}})],h.prototype,"codedValues",void 0),(0,i._)([(0,l.J)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=f=(0,i._)([(0,a.j)("esri.layers.support.CodedValueDomain")],h);const m=h;var g;r(92604),r(20102);let b=g=class extends d{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,i._)([(0,l.J)({inherited:"inherited"})],b.prototype,"type",void 0),b=g=(0,i._)([(0,a.j)("esri.layers.support.InheritedDomain")],b);const w=b;var S;let v=S=class extends d{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,i._)([(0,s.Cb)({type:Number,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]}}}})],v.prototype,"maxValue",void 0),(0,i._)([(0,s.Cb)({type:Number,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]}}}})],v.prototype,"minValue",void 0),(0,i._)([(0,l.J)({range:"range"})],v.prototype,"type",void 0),v=S=(0,i._)([(0,a.j)("esri.layers.support.RangeDomain")],v);const _=v,C={key:"type",base:d,typeMap:{range:v,"coded-value":m,inherited:w}};function T(e){if(!e?.type)return null;switch(e.type){case"range":return _.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>n});const n=new(r(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},54275:(e,t,r)=>{r.d(t,{h:()=>c});var n=r(80442),i=r(66677);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:h(e),operations:m(e.capabilities,e,t),query:g(e,t),queryRelated:b(e),queryTopFeatures:w(e),editing:S(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 h(e){return{supportsAdvancedFieldProperties:o(e,"supportsFieldDescriptionProperty",!1)}}function m(e,t,r){const n=e?e.toLowerCase().split(",").map((e=>e.trim())):[],s=r?(0,i.Qc)(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.Z)("mapserver-pbf-version-support"),f=(0,i.M8)(t),h=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&&h.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 b(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 S(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)}}},28694:(e,t,r)=>{r.d(t,{p:()=>i});var n=r(69285);function i(e,t,r){if(!r?.features||!r.hasZ)return;const i=(0,n.k)(r.geometryType,t,e.outSpatialReference);if(null!=i)for(const e of r.features)i(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>w});var n,i=r(43697),o=r(66577),s=r(38171),l=r(35454),a=r(96674),p=r(22974),u=r(5600),c=(r(75215),r(71715)),y=r(52011),d=r(30556),f=r(82971),h=r(33955),m=r(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=n=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.Z.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const i=e[t],o=s.Z.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,h.im)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=f.Z.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.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const 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,h.oU)(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,h.oU)(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,h.oU)(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.Cb)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,u.Cb)({type:[s.Z],json:{write:!0}})],b.prototype,"features",void 0),(0,i._)([(0,c.r)("features")],b.prototype,"readFeatures",null),(0,i._)([(0,u.Cb)({type:[m.Z],json:{write:!0}})],b.prototype,"fields",void 0),(0,i._)([(0,u.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,i._)([(0,d.c)("geometryType")],b.prototype,"writeGeometryType",null),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,i._)([(0,u.Cb)({types:o.qM,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,i._)([(0,c.r)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,i._)([(0,u.Cb)({type:f.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,i._)([(0,d.c)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],b.prototype,"transform",void 0),b=n=(0,i._)([(0,y.j)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const w=b},11282:(e,t,r)=>{r.d(t,{cv:()=>l,en:()=>s,lA:()=>o}),r(68773),r(40330);var n=r(22974),i=r(17452);function o(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function s(e){return"string"==typeof e?(0,i.mN)(e):(0,n.d9)(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]=[];for(let e=0;e<o.length;e++)n[i][e]=l(o[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(71058)},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>i,eG:()=>a,lF:()=>s,lj:()=>u,qP:()=>l,wW:()=>p});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}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6618,5732,447,7701],{5732:(e,t,r)=>{r.d(t,{c:()=>n,g:()=>i});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},22862:(e,t,r)=>{r.d(t,{Hg:()=>f,V7:()=>y,uD:()=>d});var n=r(92036),i=r(46791),o=r(1153);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof n.Z}function a(e){return e instanceof i.Z?Object.keys(e.items):l(e)?(0,o.vw)(e).keys():e?Object.keys(e):[]}function p(e,t){return e instanceof i.Z?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function c(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const n=a(e),i=a(t);if(0===n.length&&0===i.length)return;if(!n.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=i.filter((e=>!n.includes(e))),d=n.filter((e=>!i.includes(e))),y=n.filter((r=>i.includes(r)&&p(e,r)!==p(t,r))).concat(o,d).sort(),f=u(e);if(f&&s.has(f)&&y.length)return{type:"complete",oldValue:e,newValue:t};let h;const m=l(e)&&l(t);for(const n of y){const i=p(e,n),o=p(t,n);let s;if((m||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(r&&r[n]&&"function"==typeof r[n])s=r[n]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;s={type:"complete",oldValue:i,newValue:o}}else s="object"==typeof i&&"object"==typeof o&&u(i)===u(o)?c(i,o):{type:"complete",oldValue:i,newValue:o};null!=s&&(null!=h?h.diff[n]=s:h={type:"partial",diff:{[n]:s}})}}return h}function d(e,t){if(null==e)return!1;const r=t.split(".");let n=e;for(const e of r){if("complete"===n.type)return!0;if("partial"!==n.type)return!1;{const t=n.diff[e];if(!t)return!1;n=t}}return!0}function y(e,t){for(const r of t)if(d(e,r))return!0;return!1}function f(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},60437:(e,t,r)=>{r.d(t,{G_:()=>b,HH:()=>s,JR:()=>f,TC:()=>l,Tn:()=>c,Ue:()=>i,al:()=>o,bZ:()=>h,cS:()=>y,dp:()=>p,fS:()=>g,is:()=>m,op:()=>u,pp:()=>a,t8:()=>d});var n=r(6570);function i(e=w){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.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function u(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 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 y(e){return e?d(e,b):i(b)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function 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 m(e){return 6===e.length}function g(e,t,r){if(null==e||null==t)return e===t;if(!m(e)||!m(t))return!1;if(r){for(let 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(24470);const b=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];i()},16306:(e,t,r)=>{r.d(t,{aX:()=>_});var n=r(68773),i=r(20102),o=r(92604),s=r(38913),l=r(58901),a=r(73913),p=r(8744),u=r(40488),c=(r(66577),r(3172)),d=r(33955),y=r(11282),f=r(17452);async function h(e,t,r){const n="string"==typeof e?(0,f.mN)(e):e,i=t[0].spatialReference,o=(0,d.Ji)(t[0]),s={...r,query:{...n.query,f:"json",sr:(0,p.B9)(i),geometries:JSON.stringify((a=t,{geometryType:(0,d.Ji)(a[0]),geometries:a.map((e=>e.toJSON()))}))}},{data:l}=await(0,c.Z)(n.path+"/simplify",s);var a;return function(e,t,r){const n=(0,d.q9)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=r,t}))}(l.geometries,o,i)}const m=o.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function w(e,t,r){if(t){const t=function(e,t){if(!(e instanceof l.Z||e instanceof s.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new i.Z(e)}const r=(0,a.x3)(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.Z({rings:n,spatialReference:e.spatialReference}):new l.Z({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.Sx)(t,!0)}return r&&(e=(0,a.Sy)(e,r)),e}function S(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,a.XZ)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,a.XZ)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,a.XZ)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,a.XZ)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function v(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.x3)(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.XZ)(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.x3)(o))e[i]=e[i].addRing(t);else if(b(e))for(const t of(0,a.x3)(o))e[i]=e[i].addPath(t)}else r=i,e[i]=o}return e}async function _(e,t,r){if(!Array.isArray(e))return _([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i="string"==typeof t?t:t?.url??n.default.geometryServiceUrl;let o,f,g,b,C,T,x,F,O=0;const N=[],R=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,f=(0,p.C5)(o),g=o.isWebMercator,T=g?102100:4326,b=a.UZ[T].maxX,C=a.UZ[T].minX,x=a.UZ[T].plus180Line,F=a.UZ[T].minus180Line),f)if("mesh"===t.type)R.push(t);else if("point"===t.type)R.push(S(t.clone(),b,C));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>S(e,b,C))),R.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,f);R.push(e.rings?new s.Z(e):e)}else if(t.extent){const e=t.extent,r=(0,a.XZ)(e.xmin,C)*(2*b);let n=0===r?t.clone():(0,a.Sy)(t.clone(),r);e.offset(r,0),e.intersects(x)&&e.xmax!==b?(O=e.xmax>O?e.xmax:O,n=w(n,g),N.push(n),R.push("cut")):e.intersects(F)&&e.xmin!==C?(O=e.xmax*(2*b)>O?e.xmax*(2*b):O,n=w(n,g,360),N.push(n),R.push("cut")):R.push(n)}else R.push(t.clone());else R.push(t);else R.push(t);let Z=(0,a.XZ)(O,b),M=-90;const j=Z,I=new l.Z;for(;Z>0;){const e=360*Z-180;I.addPath([[e,M],[e,-1*M]]),M*=-1,Z--}if(N.length>0&&j>0){const t=v(N,await async function(e,t,r,n){const i=(0,y.en)(e),o=t[0].spatialReference,s={...n,responseType:"json",query:{...i.query,f:"json",sr:(0,p.B9)(o),target:JSON.stringify({geometryType:(0,d.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},l=await(0,c.Z)(i.path+"/cut",s),{cutIndexes:a,geometries:u=[]}=l.data;return{cutIndexes:a,geometries:u.map((e=>{const t=(0,d.im)(e);return t.spatialReference=o,t}))}}(i,N,I,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(g?(0,u.$)(i):i)}}if(!n.length)return o;const s=await h(i,n,r),l=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?l.push(t):l.push(g?(0,u.$)(s.shift()):s.shift())}return l}const A=[];for(let e=0;e<R.length;e++){const t=R[e];if("cut"!==t)A.push(t);else{const e=N.shift();A.push(!0===g?(0,u.$)(e):e)}}return A}},73913:(e,t,r)=>{r.d(t,{Sy:()=>a,UZ:()=>s,XZ:()=>l,x3:()=>p});var n=r(58901),i=r(82971),o=r(33955);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new n.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new n.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.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.oU)(e)?e.rings:e.paths}},62128:(e,t,r)=>{r.r(t),r.d(t,{default:()=>K});var n=r(43697),i=(r(66577),r(38171)),o=(r(9790),r(46791)),s=r(20102),l=r(22974),a=r(16453),p=r(78286),u=r(20941),c=r(5600),d=r(75215),y=r(71715),f=r(52011),h=r(30556),m=r(73615),g=r(24470),b=r(16306),w=r(8744),S=r(19238),v=(r(67676),r(80442),r(70921));r(92604);let _=class extends o.Z{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.Z.ofType(this.itemType.Type))(e):new o.Z(e)}};(0,n._)([(0,c.Cb)()],_.prototype,"owner",null),_=(0,n._)([(0,f.j)("esri.core.support.OwningCollection")],_);var C=r(87085),T=r(71612),x=r(72965),F=r(52421);let O=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,F.c)({Type:i.Z,ensureType:(0,d.se)(i.Z)})],O.prototype,"itemType",void 0),O=(0,n._)([(0,f.j)("esri.support.GraphicsCollection")],O);var N=r(86787);let R=class extends((0,T.h)((0,x.M)(C.Z))){constructor(e){super(e),this.elevationInfo=null,this.graphics=new O,this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}on(e,t){return super.on(e,t)}graphicChanged(e){this.emit("graphic-update",e)}};var Z,M;(0,n._)([(0,c.Cb)({type:N.Z})],R.prototype,"elevationInfo",void 0),(0,n._)([(0,c.Cb)((Z=O,M="graphics",{type:Z,cast:v.R,set(e){const t=(0,v.Z)(e,this._get(M),Z);t.owner=this,this._set(M,t)}}))],R.prototype,"graphics",void 0),(0,n._)([(0,c.Cb)({type:["show","hide"]})],R.prototype,"listMode",void 0),(0,n._)([(0,c.Cb)()],R.prototype,"screenSizePerspectiveEnabled",void 0),(0,n._)([(0,c.Cb)({readOnly:!0})],R.prototype,"type",void 0),(0,n._)([(0,c.Cb)({constructOnly:!0})],R.prototype,"internal",void 0),R=(0,n._)([(0,f.j)("esri.layers.GraphicsLayer")],R);const j=R;var I=r(92908),A=r(38009),L=r(16859),D=r(1231),J=r(20256),E=r(4095),P=r(77987),z=r(78724),V=r(82971),q=r(6570);function G(e){return"markup"===e.featureCollectionType||e.layers.some((e=>null!=e.layerDefinition.visibilityField||!Q(e)))}function Q({layerDefinition:e,featureSet:t}){const r=e.geometryType??t.geometryType;return X.find((t=>r===t.geometryTypeJSON&&e.drawingInfo?.renderer?.symbol?.type===t.identifyingSymbol.type))}function B(){return new q.Z({xmin:-180,ymin:-90,xmax:180,ymax:90})}const k=new D.Z({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),U=new D.Z({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0,length:255});let H=class extends j{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)(B(),e).geometry:(0,g.HH)(t,e):null}get fullBounds(){const e=this.layer?.spatialReference;if(!e)return null;const t=(0,g.cS)();return this.graphics.forEach((r=>{const n=null!=r.geometry?(0,m.projectOrLoad)(r.geometry,e).geometry:null;null!=n&&(0,g.jn)(t,"point"===n.type?n:n.extent,t)})),(0,g.fS)(t,g.G_)?null:t}get sublayers(){return this.graphics}};(0,n._)([(0,c.Cb)({readOnly:!0})],H.prototype,"fullExtent",null),(0,n._)([(0,c.Cb)({readOnly:!0})],H.prototype,"fullBounds",null),(0,n._)([(0,c.Cb)({readOnly:!0})],H.prototype,"sublayers",null),(0,n._)([(0,c.Cb)()],H.prototype,"layer",void 0),(0,n._)([(0,c.Cb)()],H.prototype,"layerId",void 0),(0,n._)([(0,c.Cb)({readOnly:!0})],H.prototype,"visibilityMode",void 0),H=(0,n._)([(0,f.j)("esri.layers.MapNotesLayer.MapNotesSublayer")],H);const X=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:(new J.Z).toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:(new E.Z).toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:(new P.Z).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:(new P.Z).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:(new z.Z).toJSON()}];let W=class extends((0,T.h)((0,x.M)((0,A.q)((0,L.I)((0,a.R)(C.Z)))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=V.Z.WGS84,this.sublayers=new o.Z(X.map((e=>new H({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:!G(t)&&"portal-item"!==r?.origin}}}readFeatureCollections(e,t,r){if(!G(t))return null;const n=t.layers.map((e=>{const t=new S.default;return t.read(e,r),t}));return new o.Z({items:n})}readLegacyfeatureCollectionJSON(e,t){return G(t)?(0,l.d9)(t.featureCollection):null}get fullExtent(){const e=this.spatialReference,t=(0,g.cS)();return null!=this.sublayers?this.sublayers.forEach((({fullBounds:e})=>null!=e?(0,g.jn)(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,g.jn)(t,n,t)})),(0,g.fS)(t,g.G_)?(0,m.projectOrLoad)(B(),e).geometry:(0,g.HH)(t,e)}readMinScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.minScale)return e.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.maxScale)return e.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?V.Z.fromJSON(t.layers[0].layerDefinition.spatialReference):V.Z.WGS84}readSublayers(e,t,r){if(G(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=Q(e);if(null!=l){const e=new H({id:l.id,title:t.name,layerId:o,layer:this,graphics:r.features.map((({geometry:e,symbol:t,attributes:r,popupInfo:n})=>i.Z.fromJSON({attributes:r,geometry:e,symbol:t,popupTemplate:n})))});n.push(e)}}return new o.Z(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.Z("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 X){const r=e.find((e=>t.id===e.id));this._writeMapNoteSublayer(a,r,t,i,o,u,n)}(0,p.RB)("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.d9)(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,w.fS)(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,b.aX)(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,k),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:(0,l.d9)(r.identifyingSymbol)}},id:t.layerId,geometryType:r.geometryTypeJSON,minScale:n,maxScale:i,objectIdField:"OBJECTID",fields:[k.toJSON(),U.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.Z("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.Z("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.S)(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.Cb)({readOnly:!0})],W.prototype,"capabilities",void 0),(0,n._)([(0,y.r)(["portal-item","web-map"],"capabilities",["layers"])],W.prototype,"readCapabilities",null),(0,n._)([(0,c.Cb)({readOnly:!0})],W.prototype,"featureCollections",void 0),(0,n._)([(0,y.r)(["web-map","portal-item"],"featureCollections",["layers"])],W.prototype,"readFeatureCollections",null),(0,n._)([(0,c.Cb)({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],W.prototype,"featureCollectionJSON",void 0),(0,n._)([(0,y.r)(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],W.prototype,"readLegacyfeatureCollectionJSON",null),(0,n._)([(0,c.Cb)({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],W.prototype,"featureCollectionType",void 0),(0,n._)([(0,c.Cb)({readOnly:!0})],W.prototype,"fullExtent",null),(0,n._)([(0,c.Cb)({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.Cb)({type:["show","hide","hide-children"]})],W.prototype,"listMode",void 0),(0,n._)([(0,c.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],W.prototype,"minScale",void 0),(0,n._)([(0,y.r)(["web-map","portal-item"],"minScale",["layers"])],W.prototype,"readMinScale",null),(0,n._)([(0,c.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],W.prototype,"maxScale",void 0),(0,n._)([(0,y.r)(["web-map","portal-item"],"maxScale",["layers"])],W.prototype,"readMaxScale",null),(0,n._)([(0,c.Cb)({readOnly:!0})],W.prototype,"multipointLayer",null),(0,n._)([(0,c.Cb)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],W.prototype,"operationalLayerType",void 0),(0,n._)([(0,c.Cb)({readOnly:!0})],W.prototype,"pointLayer",null),(0,n._)([(0,c.Cb)({readOnly:!0})],W.prototype,"polygonLayer",null),(0,n._)([(0,c.Cb)({readOnly:!0})],W.prototype,"polylineLayer",null),(0,n._)([(0,c.Cb)({type:V.Z})],W.prototype,"spatialReference",void 0),(0,n._)([(0,y.r)(["web-map","portal-item"],"spatialReference",["layers"])],W.prototype,"readSpatialReference",null),(0,n._)([(0,c.Cb)({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],W.prototype,"sublayers",void 0),(0,n._)([(0,y.r)("web-map","sublayers",["layers"])],W.prototype,"readSublayers",null),(0,n._)([(0,h.c)("web-map","sublayers")],W.prototype,"writeSublayers",null),(0,n._)([(0,c.Cb)({readOnly:!0})],W.prototype,"textLayer",null),(0,n._)([(0,c.Cb)()],W.prototype,"title",void 0),(0,n._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],W.prototype,"type",void 0),W=(0,n._)([(0,f.j)("esri.layers.MapNotesLayer")],W);const K=W},92908:(e,t,r)=>{r.d(t,{S:()=>i,X:()=>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}},54295:(e,t,r)=>{r.d(t,{V:()=>s});var n=r(43697),i=r(5600),o=(r(75215),r(67676),r(80442),r(52011));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.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,n._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>a});var n=r(43697),i=r(92604),o=r(5600),s=(r(75215),r(67676),r(80442),r(52011)),l=r(66677);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Nm)(e,i.Z.getLogger(this)))}};return(0,n._)([(0,o.Cb)()],t.prototype,"title",null),(0,n._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,n._)([(0,s.j)("esri.layers.mixins.ArcGISService")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>s});var n=r(43697),i=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,n._)([(0,i.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,n._)([(0,o.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>w});var n=r(43697),i=r(92604),o=r(95330),s=r(5600),l=r(90578),a=(r(67676),r(80442),r(52011)),p=r(82960),u=r(46791),c=(r(66643),r(20102),r(26258),r(87538));const d=new u.Z,y=new WeakMap;function f(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&d.push(new WeakRef(e))}function h(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:h(t,e%t):0}let m=0,g=0;function b(){const e=Date.now();let t=!1;for(const r of d){const n=r.deref();n?n.refreshInterval&&e-(y.get(n)??0)+5>=6e4*n.refreshInterval&&(y.set(n,e),n.refresh(e)):t=!0}if(t)for(let e=d.length-1;e>=0;e--)d.at(e).deref()||d.removeAt(e)}(0,c.EH)((()=>{const e=Date.now();let t=0;for(const r of d){const n=r.deref();n&&(t=h(Math.round(6e4*n.refreshInterval),t),n.refreshInterval?y.get(n)||y.set(n,e):y.delete(n))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(b,g)}}));const w=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||f(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,o.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,n._)([(0,s.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.C}}}}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,n._)([(0,s.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,s.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,n._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(43697),i=r(2368),o=r(35454),s=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));const p=new o.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,i.J)(s.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,n._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,n._)([(0,l.Cb)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,n._)([(0,a.j)("esri.layers.support.FeatureTemplate")],u);const c=u},16451:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(43697),i=r(2368),o=r(96674),s=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),p=r(30556),u=r(72729),c=r(70082);let d=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,n._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"id",void 0),(0,n._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"domains",void 0),(0,n._)([(0,l.r)("domains")],d.prototype,"readDomains",null),(0,n._)([(0,p.c)("domains")],d.prototype,"writeDomains",null),(0,n._)([(0,s.Cb)({type:[c.Z],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,n._)([(0,a.j)("esri.layers.support.FeatureType")],d);const y=d},1231:(e,t,r)=>{r.d(t,{Z:()=>m});var n,i=r(43697),o=r(35454),s=r(96674),l=r(5600),a=r(75215),p=(r(67676),r(80442),r(36030)),u=r(71715),c=r(52011),d=r(72729),y=r(86719);const f=new o.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=n=class extends s.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?f.fromJSON(r.fieldValueType):null}clone(){return new n({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,i._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,i._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,i._)([(0,u.r)("description")],h.prototype,"readDescription",null),(0,i._)([(0,l.Cb)({types:d.V5,json:{read:{reader:d.im},write:!0}})],h.prototype,"domain",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,i._)([(0,l.Cb)({type:a.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],h.prototype,"length",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,i._)([(0,p.J)(y.v)],h.prototype,"type",void 0),(0,i._)([(0,l.Cb)()],h.prototype,"valueType",void 0),(0,i._)([(0,u.r)("valueType",["description"])],h.prototype,"readValueType",null),(0,i._)([(0,l.Cb)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=n=(0,i._)([(0,c.j)("esri.layers.support.Field")],h);const m=h},99514:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(20102),i=r(96674),o=r(92604),s=r(69165),l=r(25031);class a{static fromJSON(e){return new a(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new a(e.fields??[],d(e))}static fromLayerJSON(e){return new a(e.fields??[],d(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,n=u(t);if(t&&n){const i=p(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,s.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,s.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,s.Dl)(e)||(0,s.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,s.Dl)(e)||(0,s.Se)(e)||e.nullable||void 0!==(0,s.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(p(e))??this._normalizedFieldsMap.get(u(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.Z.getLogger("esri.layers.support.FieldsIndex").error(new n.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),l.pt):c.has(t.type)?l._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,s.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,i.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function p(e){return e.trim().toLowerCase()}function u(e){return(0,s.q6)(e)?.toLowerCase()??""}const c=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function d(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:i}=e,o=(n?"startField"in n?n.startField:n.startTimeField:"")??"",s=(n?"endField"in n?n.endField:n.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,l.Jv)(e.dateFieldsTimeReference):null,u=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.dateFieldsTimeReference?(0,l.Jv)(i.dateFieldsTimeReference):a??l.pt:null,d=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.timeReference?(0,l.Jv)(n.timeReference):a:null,y=new Map([[p(i?.creationDateField??""),u],[p(i?.editDateField??""),u],[p(o),d],[p(s),d]]);for(const{name:n,type:i}of e.fields)if(c.has(i))t.set(n,l._4);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(n,null);else if(r)t.set(n,l._4);else{const e=y.get(p(n??""))??a;t.set(n,e)}return t}},56765:(e,t,r)=>{r.d(t,{Z:()=>u});var n,i=r(43697),o=r(46791),s=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));let p=n=class extends s.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.Z}clone(){return new n({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,i._)([(0,l.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,i._)([(0,l.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=n=(0,i._)([(0,a.j)("esri.layers.support.LayerFloorInfo")],p);const u=p},72729:(e,t,r)=>{r.d(t,{im:()=>T,V5:()=>C}),r(80442);var n,i=r(43697),o=r(22974),s=r(5600),l=(r(75215),r(36030)),a=r(52011),p=r(96674);r(67676);let u=n=class extends p.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,s.Cb)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=n=(0,i._)([(0,a.j)("esri.layers.support.CodedValue")],u);const c=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends p.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,l.J)(c)],d.prototype,"type",void 0),d=(0,i._)([(0,a.j)("esri.layers.support.Domain")],d);const y=d;var f;let h=f=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,o.d9)(this.codedValues),name:this.name})}};(0,i._)([(0,s.Cb)({type:[u],json:{write:!0}})],h.prototype,"codedValues",void 0),(0,i._)([(0,l.J)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=f=(0,i._)([(0,a.j)("esri.layers.support.CodedValueDomain")],h);const m=h;var g;r(92604),r(20102);let b=g=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,i._)([(0,l.J)({inherited:"inherited"})],b.prototype,"type",void 0),b=g=(0,i._)([(0,a.j)("esri.layers.support.InheritedDomain")],b);const w=b;var S;let v=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,i._)([(0,s.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],v.prototype,"maxValue",void 0),(0,i._)([(0,s.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],v.prototype,"minValue",void 0),(0,i._)([(0,l.J)({range:"range"})],v.prototype,"type",void 0),v=S=(0,i._)([(0,a.j)("esri.layers.support.RangeDomain")],v);const _=v,C={key:"type",base:y,typeMap:{range:v,"coded-value":m,inherited:w}};function T(e){if(!e?.type)return null;switch(e.type){case"range":return _.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>n});const n=new(r(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},54275:(e,t,r)=>{r.d(t,{h:()=>c});var n=r(80442),i=r(66677);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:d(e),attachment:y(e),data:f(e),metadata:h(e),operations:m(e.capabilities,e,t),query:g(e,t),queryRelated:b(e),queryTopFeatures:w(e),editing:S(e)}}function d(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function y(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 h(e){return{supportsAdvancedFieldProperties:o(e,"supportsFieldDescriptionProperty",!1)}}function m(e,t,r){const n=e?e.toLowerCase().split(",").map((e=>e.trim())):[],s=r?(0,i.Qc)(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 d=n.includes("changetracking"),y=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:d,supportsQuery:l,supportsQueryAnalytics:o(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:o(y,"supportsQueryAttachments",!1),supportsQueryTopFeatures:o(y,"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,d=t?.includes("MapServer"),y=!d||c>=(0,n.Z)("mapserver-pbf-version-support"),f=(0,i.M8)(t),h=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:y&&h.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 b(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 S(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)}}},28694:(e,t,r)=>{r.d(t,{p:()=>i});var n=r(69285);function i(e,t,r){if(!r?.features||!r.hasZ)return;const i=(0,n.k)(r.geometryType,t,e.outSpatialReference);if(null!=i)for(const e of r.features)i(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>w});var n,i=r(43697),o=r(66577),s=r(38171),l=r(35454),a=r(96674),p=r(22974),u=r(5600),c=(r(75215),r(71715)),d=r(52011),y=r(30556),f=r(82971),h=r(33955),m=r(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=n=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.Z.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const i=e[t],o=s.Z.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,h.im)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=f.Z.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.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const 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,h.oU)(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,h.oU)(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,h.oU)(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.Cb)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,u.Cb)({type:[s.Z],json:{write:!0}})],b.prototype,"features",void 0),(0,i._)([(0,c.r)("features")],b.prototype,"readFeatures",null),(0,i._)([(0,u.Cb)({type:[m.Z],json:{write:!0}})],b.prototype,"fields",void 0),(0,i._)([(0,u.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,i._)([(0,y.c)("geometryType")],b.prototype,"writeGeometryType",null),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,i._)([(0,u.Cb)({types:o.qM,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,i._)([(0,c.r)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,i._)([(0,u.Cb)({type:f.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,i._)([(0,y.c)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],b.prototype,"transform",void 0),b=n=(0,i._)([(0,d.j)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const w=b},11282:(e,t,r)=>{r.d(t,{cv:()=>l,en:()=>s,lA:()=>o}),r(68773),r(40330);var n=r(22974),i=r(17452);function o(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function s(e){return"string"==typeof e?(0,i.mN)(e):(0,n.d9)(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]=[];for(let e=0;e<o.length;e++)n[i][e]=l(o[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(71058)},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>i,eG:()=>a,lF:()=>s,lj:()=>u,qP:()=>l,wW:()=>p});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}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6413,5732,7701],{92835:(e,t,i)=>{i.d(t,{Z:()=>y});var r,s=i(43697),n=i(96674),o=i(35463),l=i(5600),a=(i(75215),i(67676),i(80442),i(71715)),u=i(52011),d=i(30556),h=i(25031);let c=r=class extends n.wq{static get allTime(){return p}static get empty(){return f}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===r&&i===s}expandTo(e,t=h.By){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.JE)(i,e,t));let s=this.end;if(s){const i=(0,o.JE)(s,e,t);s=s.getTime()===i.getTime()?i:(0,o.Nm)(i,1,e,t)}return new r({start:i,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,l;if(s>=t&&s<=i?o=s:t>=s&&t<=n&&(o=t),i>=s&&i<=n?l=i:n>=t&&n<=i&&(l=n),null!=o&&null!=l&&!isNaN(o)&&!isNaN(l)){const e=new r;return e.start=o===-1/0?null:new Date(o),e.end=l===1/0?null:new Date(l),e}return r.empty}offset(e,t,i=h.By){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:n,end:l}=this;return null!=n&&(s.start=(0,o.Nm)(n,e,t,i)),null!=l&&(s.end=(0,o.Nm)(l,e,t,i)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s._)([(0,a.r)("end")],c.prototype,"readEnd",null),(0,s._)([(0,d.c)("end")],c.prototype,"writeEnd",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s._)([(0,a.r)("start")],c.prototype,"readStart",null),(0,s._)([(0,d.c)("start")],c.prototype,"writeStart",null),c=r=(0,s._)([(0,u.j)("esri.TimeExtent")],c);const p=new c,f=new c({start:void 0,end:void 0}),y=c},5732:(e,t,i)=>{i.d(t,{c:()=>r,g:()=>s});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},2368:(e,t,i)=>{i.d(t,{J:()=>d,j:()=>h});var r=i(43697),s=i(92036),n=(i(80442),i(22974)),o=(i(92604),i(70586)),l=i(31263),a=i(1153),u=i(52011);const d=e=>{let t=class extends e{clone(){const e=(0,a.vw)(this);(0,o.O3)(e,"unable to clone instance of non-accessor class");const t=e.metadatas,i=e.store,r={},s=new Map;for(const e in t){const o=t[e],a=i?.originOf(e),u=o.clonable;if(o.readOnly||!1===u||a!==l.s3.USER&&a!==l.s3.DEFAULTS&&a!==l.s3.WEB_MAP&&a!==l.s3.WEB_SCENE)continue;const d=this[e];let h=null;h="function"==typeof u?u(d):"reference"===u?d:(0,n.Vo)(d),null!=d&&null==h||(a===l.s3.DEFAULTS?s.set(e,h):r[e]=h)}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(s.size){const e=(0,a.vw)(u)?.store;if(e)for(const[t,i]of s)e.set(t,i,l.s3.DEFAULTS)}return u}};return t=(0,r._)([(0,u.j)("esri.core.Clonable")],t),t};let h=class extends(d(s.Z)){};h=(0,r._)([(0,u.j)("esri.core.Clonable")],h)},57435:(e,t,i)=>{i.d(t,{Z:()=>u});var r=i(43697),s=i(46791),n=(i(66643),i(20102),i(92604),i(26258),i(87538)),o=i(5600),l=i(52011);let a=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,n.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const i of e)null!=i&&(t=this._processCollection(t,i));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const i=this.itemFilterFunction??(e=>!!e);for(const r of t)if(r){if(i(r)){const t=this.indexOf(r,e);t>=0?t!==e&&this.reorder(r,e):this.add(r,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(r);if(Array.isArray(t))for(const i of t)e=this._processCollection(e,i);else e=this._processCollection(e,t)}}return e}};(0,r._)([(0,o.Cb)()],a.prototype,"getCollections",void 0),(0,r._)([(0,o.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,r._)([(0,o.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,r._)([(0,l.j)("esri.core.CollectionFlattener")],a);const u=a},13867:(e,t,i)=>{i.d(t,{z:()=>s});var r=i(69801);class s{constructor(e,t){this._storage=new r.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,i)=>{i.d(t,{WJ:()=>l,Xq:()=>o});var r,s,n=i(44553);(s=r||(r={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class o{constructor(e,t,i){this.name=e,this._storage=t,this.id=a+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),i&&(this._storage.registerRemoveFunc(this.id,i),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,i,r=0){this._storage.put(this,e,t,i,r)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,i){this._storage.updateSize(this,e,t,i)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class l{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n.Z,this._users=new n.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}put(e,t,i,s,n){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,r.ALL)),s>this._maxSize)return void this._notifyRemove(t,i,r.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,r.ALL);const l=1+Math.max(n,-3)- -3;this._db.set(t,{entry:i,size:s,lifetime:l,lives:l}),this._size+=s,e.size+=s,this._checkSizeLimits()}updateSize(e,t,i,s){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===i){for(this._size-=n.size,e.size-=n.size;s>this._maxSize;){const e=this._notifyRemove(t,i,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}n.size=s,this._size+=s,e.size+=s,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach(((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forAll((i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}}))}));const r={};this._users.forAll((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"}));const s=Object.keys(t);s.sort(((e,i)=>t[i]-t[e])),s.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]));for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,r.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i){let r;return this._removeFuncs.some((s=>{if(e.startsWith(s[0])){const e=s[1](t,i);return"number"==typeof e&&(r=e),!0}return!1})),r}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,i]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,i,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,i=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,r.SOME);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let a=0},22862:(e,t,i)=>{i.d(t,{Hg:()=>f,V7:()=>p,uD:()=>c});var r=i(92036),s=i(46791),n=i(1153);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof r.Z}function a(e){return e instanceof s.Z?Object.keys(e.items):l(e)?(0,n.vw)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.Z?e.items[t]:e[t]}function d(e){return e?e.declaredClass:null}function h(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const r=a(e),s=a(t);if(0===r.length&&0===s.length)return;if(!r.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=s.filter((e=>!r.includes(e))),c=r.filter((e=>!s.includes(e))),p=r.filter((i=>s.includes(i)&&u(e,i)!==u(t,i))).concat(n,c).sort(),f=d(e);if(f&&o.has(f)&&p.length)return{type:"complete",oldValue:e,newValue:t};let y;const m=l(e)&&l(t);for(const r of p){const s=u(e,r),n=u(t,r);let o;if((m||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(i&&i[r]&&"function"==typeof i[r])o=i[r]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;o={type:"complete",oldValue:s,newValue:n}}else o="object"==typeof s&&"object"==typeof n&&d(s)===d(n)?h(s,n):{type:"complete",oldValue:s,newValue:n};null!=o&&(null!=y?y.diff[r]=o:y={type:"partial",diff:{[r]:o}})}}return y}function c(e,t){if(null==e)return!1;const i=t.split(".");let r=e;for(const e of i){if("complete"===r.type)return!0;if("partial"!==r.type)return!1;{const t=r.diff[e];if(!t)return!1;r=t}}return!0}function p(e,t){for(const i of t)if(c(e,i))return!0;return!1}function f(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&d(e)!==d(t)?{type:"complete",oldValue:e,newValue:t}:h(e,t)}},17445:(e,t,i)=>{i.d(t,{N1:()=>c,YP:()=>a,Z_:()=>y,gx:()=>u,nn:()=>m,on:()=>h,tX:()=>g}),i(66643),i(46791);var r=i(91460),s=i(50758),n=i(70586),o=i(95330),l=i(26258);function a(e,t,i={}){return d(e,t,i,p)}function u(e,t,i={}){return d(e,t,i,f)}function d(e,t,i={},r){let s=null;const o=i.once?(e,i)=>{r(e)&&((0,n.hw)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,l.aQ)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return s}function h(e,t,i,o={}){let l=null,u=null,d=null;function h(){l&&u&&(u.remove(),o.onListenerRemove?.(l),l=null,u=null)}function c(e){o.once&&o.once&&(0,n.hw)(d),i(e)}const p=a(e,((e,i)=>{h(),(0,r.vT)(e)&&(l=e,u=(0,r.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return d=(0,s.kB)((()=>{p.remove(),h()})),d}function c(e,t){return function(e,t,i){if((0,o.Hc)(i))return Promise.reject((0,o.zE)());const r=e();if(t?.(r))return Promise.resolve(r);let l=null;function a(){l=(0,n.hw)(l)}return new Promise(((r,n)=>{l=(0,s.AL)([(0,o.fu)(i,(()=>{a(),n((0,o.zE)())})),d(e,(e=>{a(),r(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}i(87538);const y={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},60437:(e,t,i)=>{i.d(t,{G_:()=>_,HH:()=>o,JR:()=>f,TC:()=>l,Tn:()=>h,Ue:()=>s,al:()=>n,bZ:()=>y,cS:()=>p,dp:()=>u,fS:()=>g,is:()=>m,op:()=>d,pp:()=>a,t8:()=>c});var r=i(6570);function s(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,i,r,n,o,l=s()){return l[0]=e,l[1]=t,l[2]=i,l[3]=r,l[4]=n,l[5]=o,l}function o(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new r.Z(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function h(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function p(e){return e?c(e,_):s(_)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function y(e,t,i,r,s){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function m(e){return 6===e.length}function g(e,t,i){if(null==e||null==t)return e===t;if(!m(e)||!m(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(24470);const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];s()},42756:(e,t,i)=>{i.r(t),i.d(t,{default:()=>H});var r=i(43697),s=(i(66577),i(46791)),n=i(57435),o=i(16453),l=i(95330),a=i(17445),u=i(17452),d=i(5600),h=i(75215),c=(i(67676),i(80442),i(71715)),p=i(52011),f=i(30556),y=i(82971),m=i(87085),g=i(71612),_=i(38009),b=i(16859),v=i(34760),w=i(72965),S=i(21506),F=i(32448),T=i(96674),C=i(83379),x=i(19153),z=i(68773),I=i(40330),E=(i(51773),i(3172)),N=i(22974),P=i(60437),M=i(20322);i(91423),i(74889);const R={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function O(e){const t=e.folders||[],i=t.slice(),r=new Map,s=new Map,n=new Map,o=new Map,l=new Map,a={esriGeometryPoint:s,esriGeometryPolyline:n,esriGeometryPolygon:o};(e.featureCollection?.layers||[]).forEach((e=>{const t=(0,N.d9)(e);t.featureSet.features=[];const i=e.featureSet.geometryType;r.set(i,t);const l=e.layerDefinition.objectIdField;"esriGeometryPoint"===i?L(s,l,e.featureSet.features):"esriGeometryPolyline"===i?L(n,l,e.featureSet.features):"esriGeometryPolygon"===i&&L(o,l,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((e=>{l.set(e.id,e)})),t.forEach((t=>{t.networkLinkIds.forEach((r=>{const s=function(e,t,i){const r=function(e,t){let i;return t.some((t=>t.id===e&&(i=t,!0))),i}(e,i);return r&&(r.parentFolderId=t,r.networkLink=r),r}(r,t.id,e.networkLinks);s&&i.push(s)}))})),i.forEach((e=>{if(e.featureInfos){e.points=(0,N.d9)(r.get("esriGeometryPoint")),e.polylines=(0,N.d9)(r.get("esriGeometryPolyline")),e.polygons=(0,N.d9)(r.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const i=a[t.type].get(t.id);i&&e[R[t.type]]?.featureSet.features.push(i);break}case"GroundOverlay":{const i=l.get(t.id);i&&e.mapImages.push(i);break}}e.fullExtent=k([e])}}));const u=k(i);return{folders:t,sublayers:i,extent:u}}function Z(e,t,i,r){const s=I.id?.findCredential(e);e=(0,u.fl)(e,{token:s?.token});const n=z.default.kmlServiceUrl;return(0,E.Z)(n,{query:{url:e,model:"simple",folders:"",refresh:0!==i||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:r})}function j(e,t,i=null,r=[]){const s=[],n={},o=t.sublayers,l=new Set(t.folders.map((e=>e.id)));return o.forEach((t=>{const o=new e;if(i?o.read(t,i):o.read(t),r.length&&l.has(o.id)&&(o.visible=r.includes(o.id)),n[t.id]=o,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=n[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(o)}else s.unshift(o)})),s}function L(e,t,i){i.forEach((i=>{e.set(i.attributes[t],i)}))}function k(e){const t=(0,P.Ue)(P.G_),i=(0,P.Ue)(P.G_);for(const r of e){if(r.polygons?.featureSet?.features)for(const e of r.polygons.featureSet.features)(0,M.Yg)(t,e.geometry),(0,P.TC)(i,t);if(r.polylines?.featureSet?.features)for(const e of r.polylines.featureSet.features)(0,M.Yg)(t,e.geometry),(0,P.TC)(i,t);if(r.points?.featureSet?.features)for(const e of r.points.featureSet.features)(0,M.Yg)(t,e.geometry),(0,P.TC)(i,t);if(r.mapImages)for(const e of r.mapImages)(0,M.Yg)(t,e.extent),(0,P.TC)(i,t)}return(0,P.fS)(i,P.G_)?void 0:{xmin:i[0],ymin:i[1],zmin:i[2],xmax:i[3],ymax:i[4],zmax:i[5],spatialReference:y.Z.WGS84}}var D,A=i(6570);let V=D=class extends(F.Z.EventedMixin((0,T.eC)(C.Z))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([(0,a.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),a.Z_),(0,a.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),a.Z_),(0,a.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),a.Z_),(0,a.YP)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),a.Z_)])}initialize(){(0,a.N1)((()=>this.networkLink)).then((()=>(0,a.N1)((()=>!0===this.visible)))).then((()=>this.load()))}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,i=this._fetchService(this._get("networkLink")?.href??"",t).then((e=>{const t=k(e.sublayers);this.fullExtent=A.Z.fromJSON(t),this.sourceJSON=e;const i=(0,h.se)(s.Z.ofType(D),j(D,e));this.sublayers?this.sublayers.addMany(i):this.sublayers=i,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")}));return this.addResolvingPromise(i),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}_fetchService(e,t){return Z(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then((e=>O(e.data)))}};(0,r._)([(0,d.Cb)()],V.prototype,"description",void 0),(0,r._)([(0,d.Cb)({type:A.Z})],V.prototype,"fullExtent",void 0),(0,r._)([(0,d.Cb)()],V.prototype,"id",void 0),(0,r._)([(0,d.Cb)({readOnly:!0,value:null})],V.prototype,"networkLink",void 0),(0,r._)([(0,d.Cb)({json:{write:{allowNull:!0}}})],V.prototype,"parent",void 0),(0,r._)([(0,d.Cb)({type:s.Z.ofType(V),json:{write:{allowNull:!0}}})],V.prototype,"sublayers",void 0),(0,r._)([(0,d.Cb)({value:null,json:{read:{source:"name",reader:e=>(0,x.Cb)(e)}}})],V.prototype,"title",void 0),(0,r._)([(0,d.Cb)({value:!0})],V.prototype,"visible",null),(0,r._)([(0,c.r)("visible",["visibility"])],V.prototype,"readVisible",null),(0,r._)([(0,d.Cb)()],V.prototype,"sourceJSON",void 0),(0,r._)([(0,d.Cb)()],V.prototype,"layer",void 0),V=D=(0,r._)([(0,p.j)("esri.layers.support.KMLSublayer")],V);const G=V,J=["kml","xml"];let q=class extends((0,g.h)((0,v.Q)((0,w.M)((0,_.q)((0,b.I)((0,o.R)(m.Z))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new n.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=y.Z.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.YP)((()=>this.sublayers),((e,t)=>{t&&t.forEach((e=>{e.parent=null,e.layer=null})),e&&e.forEach((e=>{e.parent=this,e.layer=this}))}),a.Z_),this.on("sublayer-update",(()=>this.notifyChange("fullExtent")))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,i){return j(G,t,i,this._visibleFolders)}writeSublayers(e,t){const i=[],r=e.toArray();for(;r.length;){const e=r[0];e.networkLink||(e.visible&&i.push(e.id),e.sublayers&&r.push(...e.sublayers.toArray())),r.shift()}t.visibleFolders=i}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.vt)(this.url,J)||"KML":e||""}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],i=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(i))};return e&&e.forEach(i),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(l.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=O((await Promise.resolve().then((()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:Z(this.url??"",this.outSpatialReference,this.refreshInterval,e)))).data);t&&this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=i=>{if(i.sublayers)for(const r of i.sublayers.items)t(r),r.visible&&r.fullExtent&&(null!=e?e.union(r.fullExtent):e=r.fullExtent.clone())};return t(this),e}};(0,r._)([(0,d.Cb)({readOnly:!0})],q.prototype,"allSublayers",void 0),(0,r._)([(0,d.Cb)({type:y.Z})],q.prototype,"outSpatialReference",void 0),(0,r._)([(0,d.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],q.prototype,"path",void 0),(0,r._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!1}})],q.prototype,"legendEnabled",void 0),(0,r._)([(0,d.Cb)({type:["show","hide","hide-children"]})],q.prototype,"listMode",void 0),(0,r._)([(0,d.Cb)({type:["KML"]})],q.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.Cb)({})],q.prototype,"resourceInfo",void 0),(0,r._)([(0,d.Cb)({type:s.Z.ofType(G),json:{write:{ignoreOrigin:!0}}})],q.prototype,"sublayers",void 0),(0,r._)([(0,c.r)(["web-map","portal-item"],"sublayers",["visibleFolders"])],q.prototype,"readSublayersFromItemOrWebMap",null),(0,r._)([(0,c.r)("service","sublayers",["sublayers"])],q.prototype,"readSublayers",null),(0,r._)([(0,f.c)("sublayers")],q.prototype,"writeSublayers",null),(0,r._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],q.prototype,"type",void 0),(0,r._)([(0,d.Cb)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],q.prototype,"title",null),(0,r._)([(0,d.Cb)(S.HQ)],q.prototype,"url",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],q.prototype,"visibleSublayers",null),(0,r._)([(0,d.Cb)({type:A.Z})],q.prototype,"extent",void 0),(0,r._)([(0,d.Cb)()],q.prototype,"fullExtent",null),q=(0,r._)([(0,p.j)("esri.layers.KMLLayer")],q);const H=q},16859:(e,t,i)=>{i.d(t,{I:()=>S});var r=i(43697),s=i(68773),n=i(40330),o=i(3172),l=i(66643),a=i(20102),u=i(92604),d=i(70586),h=i(95330),c=i(17452),p=i(5600),f=(i(75215),i(67676),i(80442),i(71715)),y=i(52011),m=i(30556),g=i(84230),_=i(48522),b=i(15235),v=i(86082),w=i(14661);const S=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.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new b.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(8062).then(i.bind(i,18062));return(0,h.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,h.D_)(e)||u.Z.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,h.r9)(e),!0))))}async setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,h.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,w.Ss)(i);let s,o;if(r)s=i.portal.url;else try{s=await(0,g.oP)(this.url,t)}catch(e){(0,h.r9)(e)}if(!s||!(0,c.Zo)(s,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await i.reload():(i=new b.default({id:e,portal:{url:s}}),await i.load(t)),i.portal.user)return(0,w.Ss)(i)}catch(e){(0,h.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=F.credential===t?F.user:await this._fetchEditingUser(e);return F.credential=t,F.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=_.Z.getDefault();if(s&&s.loaded&&(0,c.Fv)(s.restUrl)===(0,c.Fv)(r))return s.user;const a=`${r}/community/self`,u=null!=e?e.signal:null,d=await(0,l.q6)((0,o.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return d.ok?v.Z.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||_.Z.getDefault());return i&&r&&!(0,c.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,p.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,r._)([(0,f.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,p.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},F={credential:null,user:null}},34760:(e,t,i)=>{i.d(t,{Q:()=>b});var r=i(43697),s=i(92604),n=i(95330),o=i(5600),l=i(90578),a=(i(67676),i(80442),i(52011)),u=i(82960),d=i(46791),h=(i(66643),i(20102),i(26258),i(87538));const c=new d.Z,p=new WeakMap;function f(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function y(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:y(t,e%t):0}let m=0,g=0;function _(){const e=Date.now();let t=!1;for(const i of c){const r=i.deref();r?r.refreshInterval&&e-(p.get(r)??0)+5>=6e4*r.refreshInterval&&(p.set(r,e),r.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,h.EH)((()=>{const e=Date.now();let t=0;for(const i of c){const r=i.deref();r&&(t=y(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?p.get(r)||p.set(r,e):p.delete(r))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(_,g)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||f(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,r._)([(0,o.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"refreshInterval",void 0),(0,r._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,r._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,r._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,r._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},1231:(e,t,i)=>{i.d(t,{Z:()=>m});var r,s=i(43697),n=i(35454),o=i(96674),l=i(5600),a=i(75215),u=(i(67676),i(80442),i(36030)),d=i(71715),h=i(52011),c=i(72729),p=i(86719);const f=new n.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let y=r=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?f.fromJSON(i.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"alias",void 0),(0,s._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],y.prototype,"defaultValue",void 0),(0,s._)([(0,l.Cb)()],y.prototype,"description",void 0),(0,s._)([(0,d.r)("description")],y.prototype,"readDescription",null),(0,s._)([(0,l.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],y.prototype,"domain",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"editable",void 0),(0,s._)([(0,l.Cb)({type:a.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],y.prototype,"length",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"nullable",void 0),(0,s._)([(0,u.J)(p.v)],y.prototype,"type",void 0),(0,s._)([(0,l.Cb)()],y.prototype,"valueType",void 0),(0,s._)([(0,d.r)("valueType",["description"])],y.prototype,"readValueType",null),(0,s._)([(0,l.Cb)({type:Boolean,json:{read:!1}})],y.prototype,"visible",void 0),y=r=(0,s._)([(0,h.j)("esri.layers.support.Field")],y);const m=y},99514:(e,t,i)=>{i.d(t,{Z:()=>a});var r=i(20102),s=i(96674),n=i(92604),o=i(35671),l=i(25031);class a{static fromJSON(e){return new a(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new a(e.fields??[],c(e))}static fromLayerJSON(e){return new a(e.fields??[],c(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,r=d(t);if(t&&r){const s=u(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(r,e),i.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,o.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,o.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,o.Dl)(e)||(0,o.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,o.Dl)(e)||(0,o.Se)(e)||e.nullable||void 0!==(0,o.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(u(e))??this._normalizedFieldsMap.get(d(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.Z.getLogger("esri.layers.support.FieldsIndex").error(new r.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),l.pt):h.has(t.type)?l._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,o.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,s.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function u(e){return e.trim().toLowerCase()}function d(e){return(0,o.q6)(e)?.toLowerCase()??""}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function c(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:s}=e,n=(r?"startField"in r?r.startField:r.startTimeField:"")??"",o=(r?"endField"in r?r.endField:r.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,l.Jv)(e.dateFieldsTimeReference):null,d=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.dateFieldsTimeReference?(0,l.Jv)(s.dateFieldsTimeReference):a??l.pt:null,c=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.timeReference?(0,l.Jv)(r.timeReference):a:null,p=new Map([[u(s?.creationDateField??""),d],[u(s?.editDateField??""),d],[u(n),c],[u(o),c]]);for(const{name:r,type:s}of e.fields)if(h.has(s))t.set(r,l._4);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(r,null);else if(i)t.set(r,l._4);else{const e=p.get(u(r??""))??a;t.set(r,e)}return t}},72729:(e,t,i)=>{i.d(t,{im:()=>T,V5:()=>F}),i(80442);var r,s=i(43697),n=i(22974),o=i(5600),l=(i(75215),i(36030)),a=i(52011),u=i(96674);i(67676);let d=r=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],d.prototype,"code",void 0),d=r=(0,s._)([(0,a.j)("esri.layers.support.CodedValue")],d);const h=new(i(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,l.J)(h)],c.prototype,"type",void 0),c=(0,s._)([(0,a.j)("esri.layers.support.Domain")],c);const p=c;var f;let y=f=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,s._)([(0,o.Cb)({type:[d],json:{write:!0}})],y.prototype,"codedValues",void 0),(0,s._)([(0,l.J)({codedValue:"coded-value"})],y.prototype,"type",void 0),y=f=(0,s._)([(0,a.j)("esri.layers.support.CodedValueDomain")],y);const m=y;var g;i(92604),i(20102);let _=g=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,s._)([(0,l.J)({inherited:"inherited"})],_.prototype,"type",void 0),_=g=(0,s._)([(0,a.j)("esri.layers.support.InheritedDomain")],_);const b=_;var v;let w=v=class extends p{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,s._)([(0,o.Cb)({type:Number,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,i){t[i]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,s._)([(0,l.J)({range:"range"})],w.prototype,"type",void 0),w=v=(0,s._)([(0,a.j)("esri.layers.support.RangeDomain")],w);const S=w,F={key:"type",base:p,typeMap:{range:w,"coded-value":m,inherited:b}};function T(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},86719:(e,t,i)=>{i.d(t,{v:()=>r});const r=new(i(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},74889:(e,t,i)=>{i.d(t,{Z:()=>b});var r,s=i(43697),n=i(66577),o=i(38171),l=i(35454),a=i(96674),u=i(22974),d=i(5600),h=(i(75215),i(71715)),c=i(52011),p=i(30556),f=i(82971),y=i(33955),m=i(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=r=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const i=f.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const s=e[t],n=o.Z.fromJSON(s),l=s.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=i);const a=s.aggregateGeometries,u=n.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],s=r?.spatialReference;null==t||s||(t.spatialReference=i)}r.push(n)}return r}writeGeometryType(e,t,i,r){if(e)return void g.write(e,t,i,r);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,y.im)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=f.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,s]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((s-e)/i)));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,s],scale:[n,o]}=i;let l=null,a=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;a=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,(e=>e*n+r),(e=>s-e*o),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,s;const n=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=i(l[1]);e===r&&o===s||(n.push([e-r,o-s]),r=e,s=o)}else r=t(l[0]),s=i(l[1]),n.push([r,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,y.oU)(e)?e.rings:e.paths,s=[];for(let e=0,n=r.length;e<n;e++){const n=r[e],o=this._quantizePoints(n,t,i);o&&s.push(o)}return s.length>0?((0,y.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,s){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,y.oU)(e)?e.rings:e.paths;let o,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];for(let e=0,s=r.length;e<s;e++){const s=r[e];e>0?(o+=s[0],l+=s[1]):(o=s[0],l=s[1]),s[0]=t(o),s[1]=i(l)}}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=s(i[3])}}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=s(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];e>0?(o+=r[0],l+=r[1]):(o=r[0],l=r[1]),r[0]=t(o),r[1]=i(l)}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2]),t[3]=s(t[3])}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,d.Cb)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,d.Cb)({type:[o.Z],json:{write:!0}})],_.prototype,"features",void 0),(0,s._)([(0,h.r)("features")],_.prototype,"readFeatures",null),(0,s._)([(0,d.Cb)({type:[m.Z],json:{write:!0}})],_.prototype,"fields",void 0),(0,s._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,s._)([(0,p.c)("geometryType")],_.prototype,"writeGeometryType",null),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,s._)([(0,d.Cb)({types:n.qM,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,s._)([(0,h.r)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,s._)([(0,d.Cb)({type:f.Z,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,s._)([(0,p.c)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,s._)([(0,d.Cb)({json:{write:!0}})],_.prototype,"transform",void 0),_=r=(0,s._)([(0,c.j)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const b=_}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6413,5732,7701],{92835:(e,t,i)=>{i.d(t,{Z:()=>y});var r,s=i(43697),n=i(96674),o=i(35463),l=i(5600),a=(i(75215),i(67676),i(80442),i(71715)),u=i(52011),d=i(30556),h=i(25031);let c=r=class extends n.wq{static get allTime(){return p}static get empty(){return f}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===r&&i===s}expandTo(e,t=h.By){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.JE)(i,e,t));let s=this.end;if(s){const i=(0,o.JE)(s,e,t);s=s.getTime()===i.getTime()?i:(0,o.Nm)(i,1,e,t)}return new r({start:i,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,l;if(s>=t&&s<=i?o=s:t>=s&&t<=n&&(o=t),i>=s&&i<=n?l=i:n>=t&&n<=i&&(l=n),null!=o&&null!=l&&!isNaN(o)&&!isNaN(l)){const e=new r;return e.start=o===-1/0?null:new Date(o),e.end=l===1/0?null:new Date(l),e}return r.empty}offset(e,t,i=h.By){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:n,end:l}=this;return null!=n&&(s.start=(0,o.Nm)(n,e,t,i)),null!=l&&(s.end=(0,o.Nm)(l,e,t,i)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s._)([(0,a.r)("end")],c.prototype,"readEnd",null),(0,s._)([(0,d.c)("end")],c.prototype,"writeEnd",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s._)([(0,a.r)("start")],c.prototype,"readStart",null),(0,s._)([(0,d.c)("start")],c.prototype,"writeStart",null),c=r=(0,s._)([(0,u.j)("esri.TimeExtent")],c);const p=new c,f=new c({start:void 0,end:void 0}),y=c},5732:(e,t,i)=>{i.d(t,{c:()=>r,g:()=>s});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},2368:(e,t,i)=>{i.d(t,{J:()=>d,j:()=>h});var r=i(43697),s=i(92036),n=(i(80442),i(22974)),o=(i(92604),i(70586)),l=i(31263),a=i(1153),u=i(52011);const d=e=>{let t=class extends e{clone(){const e=(0,a.vw)(this);(0,o.O3)(e,"unable to clone instance of non-accessor class");const t=e.metadatas,i=e.store,r={},s=new Map;for(const e in t){const o=t[e],a=i?.originOf(e),u=o.clonable;if(o.readOnly||!1===u||a!==l.s3.USER&&a!==l.s3.DEFAULTS&&a!==l.s3.WEB_MAP&&a!==l.s3.WEB_SCENE)continue;const d=this[e];let h=null;h="function"==typeof u?u(d):"reference"===u?d:(0,n.Vo)(d),null!=d&&null==h||(a===l.s3.DEFAULTS?s.set(e,h):r[e]=h)}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(s.size){const e=(0,a.vw)(u)?.store;if(e)for(const[t,i]of s)e.set(t,i,l.s3.DEFAULTS)}return u}};return t=(0,r._)([(0,u.j)("esri.core.Clonable")],t),t};let h=class extends(d(s.Z)){};h=(0,r._)([(0,u.j)("esri.core.Clonable")],h)},57435:(e,t,i)=>{i.d(t,{Z:()=>u});var r=i(43697),s=i(46791),n=(i(66643),i(20102),i(92604),i(26258),i(87538)),o=i(5600),l=i(52011);let a=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,n.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const i of e)null!=i&&(t=this._processCollection(t,i));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const i=this.itemFilterFunction??(e=>!!e);for(const r of t)if(r){if(i(r)){const t=this.indexOf(r,e);t>=0?t!==e&&this.reorder(r,e):this.add(r,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(r);if(Array.isArray(t))for(const i of t)e=this._processCollection(e,i);else e=this._processCollection(e,t)}}return e}};(0,r._)([(0,o.Cb)()],a.prototype,"getCollections",void 0),(0,r._)([(0,o.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,r._)([(0,o.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,r._)([(0,l.j)("esri.core.CollectionFlattener")],a);const u=a},13867:(e,t,i)=>{i.d(t,{z:()=>s});var r=i(69801);class s{constructor(e,t){this._storage=new r.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,i)=>{i.d(t,{WJ:()=>l,Xq:()=>o});var r,s,n=i(44553);(s=r||(r={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class o{constructor(e,t,i){this.name=e,this._storage=t,this.id=a+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),i&&(this._storage.registerRemoveFunc(this.id,i),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,i,r=0){this._storage.put(this,e,t,i,r)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,i){this._storage.updateSize(this,e,t,i)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class l{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n.Z,this._users=new n.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}put(e,t,i,s,n){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,r.ALL)),s>this._maxSize)return void this._notifyRemove(t,i,r.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,r.ALL);const l=1+Math.max(n,-3)- -3;this._db.set(t,{entry:i,size:s,lifetime:l,lives:l}),this._size+=s,e.size+=s,this._checkSizeLimits()}updateSize(e,t,i,s){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===i){for(this._size-=n.size,e.size-=n.size;s>this._maxSize;){const e=this._notifyRemove(t,i,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}n.size=s,this._size+=s,e.size+=s,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach(((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forAll((i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}}))}));const r={};this._users.forAll((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"}));const s=Object.keys(t);s.sort(((e,i)=>t[i]-t[e])),s.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]));for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,r.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i){let r;return this._removeFuncs.some((s=>{if(e.startsWith(s[0])){const e=s[1](t,i);return"number"==typeof e&&(r=e),!0}return!1})),r}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,i]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,i,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,i=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,r.SOME);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let a=0},22862:(e,t,i)=>{i.d(t,{Hg:()=>f,V7:()=>p,uD:()=>c});var r=i(92036),s=i(46791),n=i(1153);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof r.Z}function a(e){return e instanceof s.Z?Object.keys(e.items):l(e)?(0,n.vw)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.Z?e.items[t]:e[t]}function d(e){return e?e.declaredClass:null}function h(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const r=a(e),s=a(t);if(0===r.length&&0===s.length)return;if(!r.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=s.filter((e=>!r.includes(e))),c=r.filter((e=>!s.includes(e))),p=r.filter((i=>s.includes(i)&&u(e,i)!==u(t,i))).concat(n,c).sort(),f=d(e);if(f&&o.has(f)&&p.length)return{type:"complete",oldValue:e,newValue:t};let y;const m=l(e)&&l(t);for(const r of p){const s=u(e,r),n=u(t,r);let o;if((m||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(i&&i[r]&&"function"==typeof i[r])o=i[r]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;o={type:"complete",oldValue:s,newValue:n}}else o="object"==typeof s&&"object"==typeof n&&d(s)===d(n)?h(s,n):{type:"complete",oldValue:s,newValue:n};null!=o&&(null!=y?y.diff[r]=o:y={type:"partial",diff:{[r]:o}})}}return y}function c(e,t){if(null==e)return!1;const i=t.split(".");let r=e;for(const e of i){if("complete"===r.type)return!0;if("partial"!==r.type)return!1;{const t=r.diff[e];if(!t)return!1;r=t}}return!0}function p(e,t){for(const i of t)if(c(e,i))return!0;return!1}function f(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&d(e)!==d(t)?{type:"complete",oldValue:e,newValue:t}:h(e,t)}},17445:(e,t,i)=>{i.d(t,{N1:()=>c,YP:()=>a,Z_:()=>y,gx:()=>u,nn:()=>m,on:()=>h,tX:()=>g}),i(66643),i(46791);var r=i(91460),s=i(50758),n=i(70586),o=i(95330),l=i(26258);function a(e,t,i={}){return d(e,t,i,p)}function u(e,t,i={}){return d(e,t,i,f)}function d(e,t,i={},r){let s=null;const o=i.once?(e,i)=>{r(e)&&((0,n.hw)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,l.aQ)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return s}function h(e,t,i,o={}){let l=null,u=null,d=null;function h(){l&&u&&(u.remove(),o.onListenerRemove?.(l),l=null,u=null)}function c(e){o.once&&o.once&&(0,n.hw)(d),i(e)}const p=a(e,((e,i)=>{h(),(0,r.vT)(e)&&(l=e,u=(0,r.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return d=(0,s.kB)((()=>{p.remove(),h()})),d}function c(e,t){return function(e,t,i){if((0,o.Hc)(i))return Promise.reject((0,o.zE)());const r=e();if(t?.(r))return Promise.resolve(r);let l=null;function a(){l=(0,n.hw)(l)}return new Promise(((r,n)=>{l=(0,s.AL)([(0,o.fu)(i,(()=>{a(),n((0,o.zE)())})),d(e,(e=>{a(),r(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}i(87538);const y={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},60437:(e,t,i)=>{i.d(t,{G_:()=>_,HH:()=>o,JR:()=>f,TC:()=>l,Tn:()=>h,Ue:()=>s,al:()=>n,bZ:()=>y,cS:()=>p,dp:()=>u,fS:()=>g,is:()=>m,op:()=>d,pp:()=>a,t8:()=>c});var r=i(6570);function s(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,i,r,n,o,l=s()){return l[0]=e,l[1]=t,l[2]=i,l[3]=r,l[4]=n,l[5]=o,l}function o(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new r.Z(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function h(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function p(e){return e?c(e,_):s(_)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function y(e,t,i,r,s){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function m(e){return 6===e.length}function g(e,t,i){if(null==e||null==t)return e===t;if(!m(e)||!m(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(24470);const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];s()},42756:(e,t,i)=>{i.r(t),i.d(t,{default:()=>H});var r=i(43697),s=(i(66577),i(46791)),n=i(57435),o=i(16453),l=i(95330),a=i(17445),u=i(17452),d=i(5600),h=i(75215),c=(i(67676),i(80442),i(71715)),p=i(52011),f=i(30556),y=i(82971),m=i(87085),g=i(71612),_=i(38009),b=i(16859),v=i(34760),w=i(72965),S=i(21506),F=i(32448),T=i(96674),C=i(83379),x=i(19153),z=i(68773),I=i(40330),E=(i(51773),i(3172)),P=i(22974),N=i(60437),M=i(20322);i(91423),i(74889);const R={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function O(e){const t=e.folders||[],i=t.slice(),r=new Map,s=new Map,n=new Map,o=new Map,l=new Map,a={esriGeometryPoint:s,esriGeometryPolyline:n,esriGeometryPolygon:o};(e.featureCollection?.layers||[]).forEach((e=>{const t=(0,P.d9)(e);t.featureSet.features=[];const i=e.featureSet.geometryType;r.set(i,t);const l=e.layerDefinition.objectIdField;"esriGeometryPoint"===i?L(s,l,e.featureSet.features):"esriGeometryPolyline"===i?L(n,l,e.featureSet.features):"esriGeometryPolygon"===i&&L(o,l,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((e=>{l.set(e.id,e)})),t.forEach((t=>{t.networkLinkIds.forEach((r=>{const s=function(e,t,i){const r=function(e,t){let i;return t.some((t=>t.id===e&&(i=t,!0))),i}(e,i);return r&&(r.parentFolderId=t,r.networkLink=r),r}(r,t.id,e.networkLinks);s&&i.push(s)}))})),i.forEach((e=>{if(e.featureInfos){e.points=(0,P.d9)(r.get("esriGeometryPoint")),e.polylines=(0,P.d9)(r.get("esriGeometryPolyline")),e.polygons=(0,P.d9)(r.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const i=a[t.type].get(t.id);i&&e[R[t.type]]?.featureSet.features.push(i);break}case"GroundOverlay":{const i=l.get(t.id);i&&e.mapImages.push(i);break}}e.fullExtent=k([e])}}));const u=k(i);return{folders:t,sublayers:i,extent:u}}function Z(e,t,i,r){const s=I.id?.findCredential(e);e=(0,u.fl)(e,{token:s?.token});const n=z.default.kmlServiceUrl;return(0,E.Z)(n,{query:{url:e,model:"simple",folders:"",refresh:0!==i||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:r})}function j(e,t,i=null,r=[]){const s=[],n={},o=t.sublayers,l=new Set(t.folders.map((e=>e.id)));return o.forEach((t=>{const o=new e;if(i?o.read(t,i):o.read(t),r.length&&l.has(o.id)&&(o.visible=r.includes(o.id)),n[t.id]=o,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=n[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(o)}else s.unshift(o)})),s}function L(e,t,i){i.forEach((i=>{e.set(i.attributes[t],i)}))}function k(e){const t=(0,N.Ue)(N.G_),i=(0,N.Ue)(N.G_);for(const r of e){if(r.polygons?.featureSet?.features)for(const e of r.polygons.featureSet.features)(0,M.Yg)(t,e.geometry),(0,N.TC)(i,t);if(r.polylines?.featureSet?.features)for(const e of r.polylines.featureSet.features)(0,M.Yg)(t,e.geometry),(0,N.TC)(i,t);if(r.points?.featureSet?.features)for(const e of r.points.featureSet.features)(0,M.Yg)(t,e.geometry),(0,N.TC)(i,t);if(r.mapImages)for(const e of r.mapImages)(0,M.Yg)(t,e.extent),(0,N.TC)(i,t)}return(0,N.fS)(i,N.G_)?void 0:{xmin:i[0],ymin:i[1],zmin:i[2],xmax:i[3],ymax:i[4],zmax:i[5],spatialReference:y.Z.WGS84}}var D,A=i(6570);let V=D=class extends(F.Z.EventedMixin((0,T.eC)(C.Z))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([(0,a.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),a.Z_),(0,a.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),a.Z_),(0,a.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),a.Z_),(0,a.YP)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),a.Z_)])}initialize(){(0,a.N1)((()=>this.networkLink)).then((()=>(0,a.N1)((()=>!0===this.visible)))).then((()=>this.load()))}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,i=this._fetchService(this._get("networkLink")?.href??"",t).then((e=>{const t=k(e.sublayers);this.fullExtent=A.Z.fromJSON(t),this.sourceJSON=e;const i=(0,h.se)(s.Z.ofType(D),j(D,e));this.sublayers?this.sublayers.addMany(i):this.sublayers=i,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")}));return this.addResolvingPromise(i),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}_fetchService(e,t){return Z(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then((e=>O(e.data)))}};(0,r._)([(0,d.Cb)()],V.prototype,"description",void 0),(0,r._)([(0,d.Cb)({type:A.Z})],V.prototype,"fullExtent",void 0),(0,r._)([(0,d.Cb)()],V.prototype,"id",void 0),(0,r._)([(0,d.Cb)({readOnly:!0,value:null})],V.prototype,"networkLink",void 0),(0,r._)([(0,d.Cb)({json:{write:{allowNull:!0}}})],V.prototype,"parent",void 0),(0,r._)([(0,d.Cb)({type:s.Z.ofType(V),json:{write:{allowNull:!0}}})],V.prototype,"sublayers",void 0),(0,r._)([(0,d.Cb)({value:null,json:{read:{source:"name",reader:e=>(0,x.Cb)(e)}}})],V.prototype,"title",void 0),(0,r._)([(0,d.Cb)({value:!0})],V.prototype,"visible",null),(0,r._)([(0,c.r)("visible",["visibility"])],V.prototype,"readVisible",null),(0,r._)([(0,d.Cb)()],V.prototype,"sourceJSON",void 0),(0,r._)([(0,d.Cb)()],V.prototype,"layer",void 0),V=D=(0,r._)([(0,p.j)("esri.layers.support.KMLSublayer")],V);const G=V,J=["kml","xml"];let q=class extends((0,g.h)((0,v.Q)((0,w.M)((0,_.q)((0,b.I)((0,o.R)(m.Z))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new n.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=y.Z.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.YP)((()=>this.sublayers),((e,t)=>{t&&t.forEach((e=>{e.parent=null,e.layer=null})),e&&e.forEach((e=>{e.parent=this,e.layer=this}))}),a.Z_),this.on("sublayer-update",(()=>this.notifyChange("fullExtent")))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,i){return j(G,t,i,this._visibleFolders)}writeSublayers(e,t){const i=[],r=e.toArray();for(;r.length;){const e=r[0];e.networkLink||(e.visible&&i.push(e.id),e.sublayers&&r.push(...e.sublayers.toArray())),r.shift()}t.visibleFolders=i}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.vt)(this.url,J)||"KML":e||""}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],i=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(i))};return e&&e.forEach(i),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(l.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=O((await Promise.resolve().then((()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:Z(this.url??"",this.outSpatialReference,this.refreshInterval,e)))).data);t&&this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=i=>{if(i.sublayers)for(const r of i.sublayers.items)t(r),r.visible&&r.fullExtent&&(null!=e?e.union(r.fullExtent):e=r.fullExtent.clone())};return t(this),e}};(0,r._)([(0,d.Cb)({readOnly:!0})],q.prototype,"allSublayers",void 0),(0,r._)([(0,d.Cb)({type:y.Z})],q.prototype,"outSpatialReference",void 0),(0,r._)([(0,d.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],q.prototype,"path",void 0),(0,r._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!1}})],q.prototype,"legendEnabled",void 0),(0,r._)([(0,d.Cb)({type:["show","hide","hide-children"]})],q.prototype,"listMode",void 0),(0,r._)([(0,d.Cb)({type:["KML"]})],q.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.Cb)({})],q.prototype,"resourceInfo",void 0),(0,r._)([(0,d.Cb)({type:s.Z.ofType(G),json:{write:{ignoreOrigin:!0}}})],q.prototype,"sublayers",void 0),(0,r._)([(0,c.r)(["web-map","portal-item"],"sublayers",["visibleFolders"])],q.prototype,"readSublayersFromItemOrWebMap",null),(0,r._)([(0,c.r)("service","sublayers",["sublayers"])],q.prototype,"readSublayers",null),(0,r._)([(0,f.c)("sublayers")],q.prototype,"writeSublayers",null),(0,r._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],q.prototype,"type",void 0),(0,r._)([(0,d.Cb)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],q.prototype,"title",null),(0,r._)([(0,d.Cb)(S.HQ)],q.prototype,"url",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],q.prototype,"visibleSublayers",null),(0,r._)([(0,d.Cb)({type:A.Z})],q.prototype,"extent",void 0),(0,r._)([(0,d.Cb)()],q.prototype,"fullExtent",null),q=(0,r._)([(0,p.j)("esri.layers.KMLLayer")],q);const H=q},16859:(e,t,i)=>{i.d(t,{I:()=>S});var r=i(43697),s=i(68773),n=i(40330),o=i(3172),l=i(66643),a=i(20102),u=i(92604),d=i(70586),h=i(95330),c=i(17452),p=i(5600),f=(i(75215),i(67676),i(80442),i(71715)),y=i(52011),m=i(30556),g=i(84230),_=i(48522),b=i(15235),v=i(86082),w=i(14661);const S=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.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new b.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(8062).then(i.bind(i,18062));return(0,h.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,h.D_)(e)||u.Z.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,h.r9)(e),!0))))}async setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,h.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,w.Ss)(i);let s,o;if(r)s=i.portal.url;else try{s=await(0,g.oP)(this.url,t)}catch(e){(0,h.r9)(e)}if(!s||!(0,c.Zo)(s,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await i.reload():(i=new b.default({id:e,portal:{url:s}}),await i.load(t)),i.portal.user)return(0,w.Ss)(i)}catch(e){(0,h.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=F.credential===t?F.user:await this._fetchEditingUser(e);return F.credential=t,F.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=_.Z.getDefault();if(s&&s.loaded&&(0,c.Fv)(s.restUrl)===(0,c.Fv)(r))return s.user;const a=`${r}/community/self`,u=null!=e?e.signal:null,d=await(0,l.q6)((0,o.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return d.ok?v.Z.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||_.Z.getDefault());return i&&r&&!(0,c.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,p.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,r._)([(0,f.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,p.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},F={credential:null,user:null}},34760:(e,t,i)=>{i.d(t,{Q:()=>b});var r=i(43697),s=i(92604),n=i(95330),o=i(5600),l=i(90578),a=(i(67676),i(80442),i(52011)),u=i(82960),d=i(46791),h=(i(66643),i(20102),i(26258),i(87538));const c=new d.Z,p=new WeakMap;function f(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function y(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:y(t,e%t):0}let m=0,g=0;function _(){const e=Date.now();let t=!1;for(const i of c){const r=i.deref();r?r.refreshInterval&&e-(p.get(r)??0)+5>=6e4*r.refreshInterval&&(p.set(r,e),r.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,h.EH)((()=>{const e=Date.now();let t=0;for(const i of c){const r=i.deref();r&&(t=y(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?p.get(r)||p.set(r,e):p.delete(r))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(_,g)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||f(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,r._)([(0,o.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"refreshInterval",void 0),(0,r._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,r._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,r._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,r._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},1231:(e,t,i)=>{i.d(t,{Z:()=>m});var r,s=i(43697),n=i(35454),o=i(96674),l=i(5600),a=i(75215),u=(i(67676),i(80442),i(36030)),d=i(71715),h=i(52011),c=i(72729),p=i(86719);const f=new n.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let y=r=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?f.fromJSON(i.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"alias",void 0),(0,s._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],y.prototype,"defaultValue",void 0),(0,s._)([(0,l.Cb)()],y.prototype,"description",void 0),(0,s._)([(0,d.r)("description")],y.prototype,"readDescription",null),(0,s._)([(0,l.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],y.prototype,"domain",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"editable",void 0),(0,s._)([(0,l.Cb)({type:a.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],y.prototype,"length",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"nullable",void 0),(0,s._)([(0,u.J)(p.v)],y.prototype,"type",void 0),(0,s._)([(0,l.Cb)()],y.prototype,"valueType",void 0),(0,s._)([(0,d.r)("valueType",["description"])],y.prototype,"readValueType",null),(0,s._)([(0,l.Cb)({type:Boolean,json:{read:!1}})],y.prototype,"visible",void 0),y=r=(0,s._)([(0,h.j)("esri.layers.support.Field")],y);const m=y},99514:(e,t,i)=>{i.d(t,{Z:()=>a});var r=i(20102),s=i(96674),n=i(92604),o=i(69165),l=i(25031);class a{static fromJSON(e){return new a(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new a(e.fields??[],c(e))}static fromLayerJSON(e){return new a(e.fields??[],c(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,r=d(t);if(t&&r){const s=u(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(r,e),i.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,o.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,o.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,o.Dl)(e)||(0,o.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,o.Dl)(e)||(0,o.Se)(e)||e.nullable||void 0!==(0,o.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(u(e))??this._normalizedFieldsMap.get(d(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.Z.getLogger("esri.layers.support.FieldsIndex").error(new r.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),l.pt):h.has(t.type)?l._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,o.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,s.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function u(e){return e.trim().toLowerCase()}function d(e){return(0,o.q6)(e)?.toLowerCase()??""}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function c(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:s}=e,n=(r?"startField"in r?r.startField:r.startTimeField:"")??"",o=(r?"endField"in r?r.endField:r.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,l.Jv)(e.dateFieldsTimeReference):null,d=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.dateFieldsTimeReference?(0,l.Jv)(s.dateFieldsTimeReference):a??l.pt:null,c=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.timeReference?(0,l.Jv)(r.timeReference):a:null,p=new Map([[u(s?.creationDateField??""),d],[u(s?.editDateField??""),d],[u(n),c],[u(o),c]]);for(const{name:r,type:s}of e.fields)if(h.has(s))t.set(r,l._4);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(r,null);else if(i)t.set(r,l._4);else{const e=p.get(u(r??""))??a;t.set(r,e)}return t}},72729:(e,t,i)=>{i.d(t,{im:()=>T,V5:()=>F}),i(80442);var r,s=i(43697),n=i(22974),o=i(5600),l=(i(75215),i(36030)),a=i(52011),u=i(96674);i(67676);let d=r=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],d.prototype,"code",void 0),d=r=(0,s._)([(0,a.j)("esri.layers.support.CodedValue")],d);const h=new(i(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,l.J)(h)],c.prototype,"type",void 0),c=(0,s._)([(0,a.j)("esri.layers.support.Domain")],c);const p=c;var f;let y=f=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,s._)([(0,o.Cb)({type:[d],json:{write:!0}})],y.prototype,"codedValues",void 0),(0,s._)([(0,l.J)({codedValue:"coded-value"})],y.prototype,"type",void 0),y=f=(0,s._)([(0,a.j)("esri.layers.support.CodedValueDomain")],y);const m=y;var g;i(92604),i(20102);let _=g=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,s._)([(0,l.J)({inherited:"inherited"})],_.prototype,"type",void 0),_=g=(0,s._)([(0,a.j)("esri.layers.support.InheritedDomain")],_);const b=_;var v;let w=v=class extends p{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,s._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,s._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,s._)([(0,l.J)({range:"range"})],w.prototype,"type",void 0),w=v=(0,s._)([(0,a.j)("esri.layers.support.RangeDomain")],w);const S=w,F={key:"type",base:p,typeMap:{range:w,"coded-value":m,inherited:b}};function T(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},86719:(e,t,i)=>{i.d(t,{v:()=>r});const r=new(i(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},74889:(e,t,i)=>{i.d(t,{Z:()=>b});var r,s=i(43697),n=i(66577),o=i(38171),l=i(35454),a=i(96674),u=i(22974),d=i(5600),h=(i(75215),i(71715)),c=i(52011),p=i(30556),f=i(82971),y=i(33955),m=i(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=r=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const i=f.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const s=e[t],n=o.Z.fromJSON(s),l=s.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=i);const a=s.aggregateGeometries,u=n.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],s=r?.spatialReference;null==t||s||(t.spatialReference=i)}r.push(n)}return r}writeGeometryType(e,t,i,r){if(e)return void g.write(e,t,i,r);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,y.im)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=f.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,s]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((s-e)/i)));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,s],scale:[n,o]}=i;let l=null,a=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;a=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,(e=>e*n+r),(e=>s-e*o),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,s;const n=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=i(l[1]);e===r&&o===s||(n.push([e-r,o-s]),r=e,s=o)}else r=t(l[0]),s=i(l[1]),n.push([r,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,y.oU)(e)?e.rings:e.paths,s=[];for(let e=0,n=r.length;e<n;e++){const n=r[e],o=this._quantizePoints(n,t,i);o&&s.push(o)}return s.length>0?((0,y.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,s){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,y.oU)(e)?e.rings:e.paths;let o,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];for(let e=0,s=r.length;e<s;e++){const s=r[e];e>0?(o+=s[0],l+=s[1]):(o=s[0],l=s[1]),s[0]=t(o),s[1]=i(l)}}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=s(i[3])}}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=s(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];e>0?(o+=r[0],l+=r[1]):(o=r[0],l=r[1]),r[0]=t(o),r[1]=i(l)}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2]),t[3]=s(t[3])}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,d.Cb)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,d.Cb)({type:[o.Z],json:{write:!0}})],_.prototype,"features",void 0),(0,s._)([(0,h.r)("features")],_.prototype,"readFeatures",null),(0,s._)([(0,d.Cb)({type:[m.Z],json:{write:!0}})],_.prototype,"fields",void 0),(0,s._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,s._)([(0,p.c)("geometryType")],_.prototype,"writeGeometryType",null),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,s._)([(0,d.Cb)({types:n.qM,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,s._)([(0,h.r)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,s._)([(0,d.Cb)({type:f.Z,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,s._)([(0,p.c)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,s._)([(0,d.Cb)({json:{write:!0}})],_.prototype,"transform",void 0),_=r=(0,s._)([(0,c.j)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const b=_}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8062,8008],{7335:(e,a,r)=>{r.d(a,{L:()=>n});var t=r(96187);class n{constructor(){this._serviceMetadatas=new Map}async fetchServiceMetadata(e,a){const r=this._serviceMetadatas.get(e);if(r)return r;const n=await(0,t.T)(e,a);return this._serviceMetadatas.set(e,n),n}}},71592:(e,a,r)=>{r.d(a,{w:()=>y});var t=r(40330),n=r(3172),i=r(20102),l=r(95330),s=r(66677),o=r(48522),c=r(15235);async function y(e,a){const r=(0,s.Qc)(e);if(!r)throw new i.Z("invalid-url","Invalid scene service url");const y={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(y.sceneLayerItem??=await async function(e){const a=(await u(e)).serviceItemId;if(!a)return null;const r=new c.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.Z)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,l.r9)(e)}return null}(e);null!=i&&(r.portal=new o.Z({url:i}));try{return r.load({signal:e.signal})}catch(e){return(0,l.r9)(e),null}}(y),null==y.sceneLayerItem)return d(y.sceneServerUrl.replace("/SceneServer","/FeatureServer"),y);const p=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!r)return null;const t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,l.r9)(e),null}}(y);if(!p?.url)throw new i.Z("related-service-not-found","Could not find feature service through portal item relationship");const f=await d(p.url,y);return f.portalItem=p,f}async function u(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.Z)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,s.Qc)(e);if(!r)throw new i.Z("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,l=a.layerId;if(null==l)return{serverUrl:t};const o=u(a),c=e=>{const r={query:{f:"json"},responseType:"json",authMode:e,signal:a.signal};return(0,n.Z)(t,r)},y=c("anonymous").catch((()=>c("no-prompt"))),[d,p]=await Promise.all([y,o]),f=p?.layers,L=d.data&&d.data.layers;if(!Array.isArray(L))throw new Error("expected layers array");if(Array.isArray(f)){for(let e=0;e<Math.min(f.length,L.length);e++)if(f[e].id===l)return{serverUrl:t,layerId:L[e].id}}else if(null!=l&&l<L.length)return{serverUrl:t,layerId:L[l].id};throw new Error("could not find matching associated sublayer")}},52104:(e,a,r)=>{r.d(a,{V:()=>n});var t=r(96187);async function n(e,a){const r=await(0,t.T)(e,a);r.layers=r.layers.filter(i);const n={serviceJSON:r};if((r.currentVersion??0)<10.5)return n;const l=await(0,t.T)(e+"/layers",a);return n.layersJSON={layers:l.layers.filter(i),tables:l.tables},n}function i(e){return!e.type||"Feature Layer"===e.type||"Oriented Imagery Layer"===e.type}},70024:(e,a,r)=>{r.d(a,{k:()=>M,populateOperationalLayers:()=>y});var t=r(46791),n=(r(80442),r(7335)),i=r(87344),l=r(15235);function s(e,a){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===a}var o=r(28008),c=r(40555);async function y(e,a,r){if(!a)return;const t=[];for(const e of a)t.push(g(e,r));const n=await Promise.allSettled(t);for(const a of n)"rejected"===a.status||a.value&&e.add(a.value)}const u={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",PointCloudLayer:"PointCloudLayer",ArcGISSceneServiceLayer:"SceneLayer",IntegratedMeshLayer:"IntegratedMeshLayer",OGCFeatureLayer:"OGCFeatureLayer",BuildingSceneLayer:"BuildingSceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",GroupLayer:"GroupLayer",GeoJSON:"GeoJSONLayer",WebTiledLayer:"WebTileLayer",CSV:"CSVLayer",VectorTileLayer:"VectorTileLayer",WFS:"WFSLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer",KML:"KMLLayer",RasterDataLayer:"UnsupportedLayer",Voxel:"VoxelLayer",LineOfSightLayer:"LineOfSightLayer"},d={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},p={ArcGISFeatureLayer:"FeatureLayer"},f={ArcGISTiledMapServiceLayer:"TileLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",OpenStreetMap:"OpenStreetMapLayer",WebTiledLayer:"WebTileLayer",VectorTileLayer:"VectorTileLayer",ArcGISImageServiceLayer:"UnsupportedLayer",WMS:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",DefaultTileLayer:"TileLayer"},L={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoRSS:"GeoRSSLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},m={ArcGISFeatureLayer:"FeatureLayer"},w={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"},S={...L,LinkChartLayer:"LinkChartLayer"},h={...m},I={...w};async function g(e,a){return async function(e,a,r){const t=new e;return t.read(a,r.context),"group"===t.type&&("GroupLayer"===a.layerType?await M(t,a,r):v(a)?function(e,a,r){a.itemId&&(e.portalItem=new l.default({id:a.itemId,portal:r?.portal}),e.when((()=>{const t=t=>{const n=t.layerId;G(t,e,a,n,r);const i=a.featureCollection?.layers?.[n];i&&t.read(i,r)};e.layers?.forEach(t),e.tables?.forEach(t)})))}(t,a,r.context):b(a)&&await async function(e,a,r){const t=i.T.FeatureLayer,n=await t(),l=a.featureCollection,s=l?.showLegend,o=l?.layers?.map(((t,i)=>{const l=new n;l.read(t,r);const o={...r,ignoreDefaults:!0};return G(l,e,a,i,o),null!=s&&l.read({showLegend:s},o),l}));e.layers.addMany(o??[])}(t,a,r.context)),await(0,c.y)(t,r.context),t}(await async function(e,a){const r=a.context,t=T(r);let c=e.layerType||e.type;!c&&a?.defaultLayerType&&(c=a.defaultLayerType);const y=t[c];let u=y?i.T[y]:i.T.UnknownLayer;if(v(e)){const a=r?.portal;if(e.itemId){const r=new l.default({id:e.itemId,portal:a});await r.load();const t=(await(0,o.v)(r,new n.L)).className||"UnknownLayer";u=i.T[t]}}else"ArcGISFeatureLayer"===c?function(e){return s(e,"notes")}(e)||function(e){return s(e,"markup")}(e)?u=i.T.MapNotesLayer:function(e){return s(e,"route")}(e)?u=i.T.RouteLayer:b(e)&&(u=i.T.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?u=i.T.WMTSLayer:"WFS"===c&&"2.0.0"!==e.wfsInfo?.version&&(u=i.T.UnsupportedLayer);return u()}(e,a),e,a)}function b(e){return"ArcGISFeatureLayer"===e.layerType&&!v(e)&&(e.featureCollection?.layers?.length??0)>1}function v(e){return"Feature Collection"===e.type}function T(e){let a;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap":a=f;break;case"ground":a=d;break;case"tables":a=p;break;default:a=u}break;case"link-chart":switch(e.layerContainerType){case"basemap":a=I;break;case"tables":a=h;break;default:a=S}break;default:switch(e.layerContainerType){case"basemap":a=w;break;case"tables":a=m;break;default:a=L}}return a}async function M(e,a,r){const n=new t.Z,i=y(n,Array.isArray(a.layers)?a.layers:[],r);try{try{if(await i,"group"===e.type)return e.layers.addMany(n),e}catch(a){e.destroy();for(const e of n)e.destroy();throw a}}catch(e){throw e}}function G(e,a,r,t,n){e.read({id:`${a.id}-sublayer-${t}`,visibility:r.visibleLayers?.includes(t)??!0},n)}},87344:(e,a,r)=>{r.d(a,{T:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(8153)]).then(r.bind(r,2723))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(4680),r.e(9238),r.e(6170),r.e(1767),r.e(4681),r.e(3554)]).then(r.bind(r,30223))).default,CSVLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(4680),r.e(9238),r.e(7587)]).then(r.bind(r,45425))).default,DimensionLayer:async()=>(await Promise.all([r.e(163),r.e(9717)]).then(r.bind(r,40081))).default,ElevationLayer:async()=>(await Promise.all([r.e(163),r.e(9016),r.e(2763)]).then(r.bind(r,65665))).default,FeatureLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(4680),r.e(9238),r.e(447)]).then(r.bind(r,19238))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(8621)]).then(r.bind(r,23477))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(6e3)]).then(r.bind(r,3723))).default,GroupLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9059)]).then(r.bind(r,40504))).default,ImageryLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(4599),r.e(6610),r.e(1319),r.e(4608)]).then(r.bind(r,60590))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(6610),r.e(1319),r.e(4136),r.e(9532)]).then(r.bind(r,74878))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(163),r.e(1767),r.e(1537)]).then(r.bind(r,9310))).default,KMLLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(1423),r.e(6413)]).then(r.bind(r,42756))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(163),r.e(4998)]).then(r.bind(r,21786))).default,LinkChartLayer:async()=>(await Promise.all([r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(6404),r.e(8968),r.e(3794),r.e(5129)]).then(r.bind(r,19087))).default,MapImageLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(4599),r.e(9735),r.e(2725),r.e(7374)]).then(r.bind(r,27374))).default,MapNotesLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(4680),r.e(9238),r.e(6618)]).then(r.bind(r,62128))).default,MediaLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4828)]).then(r.bind(r,57765))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(3966),r.e(3809)]).then(r.bind(r,88068))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971),r.e(6237)]).then(r.bind(r,66237))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(4680),r.e(9238),r.e(178)]).then(r.bind(r,44958))).default,PointCloudLayer:async()=>(await Promise.all([r.e(163),r.e(8775),r.e(1767),r.e(7863)]).then(r.bind(r,10608))).default,RouteLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(1423),r.e(9206)]).then(r.bind(r,40153))).default,SceneLayer:async()=>(await Promise.all([r.e(163),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6170),r.e(1767),r.e(4681),r.e(299)]).then(r.bind(r,57476))).default,StreamLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(3847)]).then(r.bind(r,88387))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(4680),r.e(7157),r.e(7701)]).then(r.bind(r,20697))).default,TileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(4599),r.e(9735),r.e(9016),r.e(2725),r.e(8636)]).then(r.bind(r,98636))).default,UnknownLayer:async()=>(await r.e(4166).then(r.bind(r,44166))).default,UnsupportedLayer:async()=>(await r.e(9296).then(r.bind(r,39296))).default,VectorTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9016),r.e(4325),r.e(9805),r.e(5481)]).then(r.bind(r,94756))).default,VoxelLayer:async()=>(await Promise.all([r.e(163),r.e(8775),r.e(1767),r.e(7528)]).then(r.bind(r,28865))).default,WFSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7899),r.e(957),r.e(1423),r.e(3778),r.e(6404),r.e(8089),r.e(5245)]).then(r.bind(r,12653))).default,WMSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(7915)]).then(r.bind(r,25906))).default,WMTSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971),r.e(2594)]).then(r.bind(r,72594))).default,WebTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971)]).then(r.bind(r,16199))).default}},33516:(e,a,r)=>{r.d(a,{M4:()=>o,Yv:()=>l,ht:()=>i,wk:()=>s});var t=r(17452),n=r(48522);function i(e){return{origin:"portal-item",url:(0,t.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function l(e){const a=(0,t.mN)(e.itemUrl);return{origin:"portal-item",messages:[],writtenProperties:[],url:a,portal:e.portal||n.Z.getDefault(),portalItem:e,verifyItemRelativeUrls:a?{rootPath:a.path,writtenUrls:[]}:null,blockedRelativeUrls:[]}}function s(e){return{origin:"web-map",url:(0,t.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function o(e,a){const r=(0,t.mN)(e.itemUrl);return{origin:"web-map",messages:[],writtenProperties:[],url:r,portal:e.portal||n.Z.getDefault(),portalItem:e,initiator:a,verifyItemRelativeUrls:r?{rootPath:r.path,writtenUrls:[]}:null,blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}}}},18062:(e,a,r)=>{r.d(a,{load:()=>L});var t=r(20102),n=r(66677),i=r(52104),l=r(7335),s=r(70024),o=r(87344),c=r(48522),y=r(33516),u=r(3072),d=r(14661),p=r(40555),f=r(96187);async function L(e,a){const r=e.instance.portalItem;if(r?.id)return await r.load(a),function(e){const a=e.instance.portalItem;if(!a?.type||!e.supportedTypes.includes(a.type))throw new t.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:a?.type,expectedType:e.supportedTypes.join(", ")})}(e),async function(e,a){const r=e.instance,n=r.portalItem;if(!n)return;const{url:o,title:c}=n,L=(0,y.ht)(n);if("group"===r.type)return async function(e,a,r){const n=e.portalItem;if(!e.sourceIsPortalItem)return;const{title:o,type:c}=n;if("Group Layer"===c){if(!(0,d._$)(n,"Map"))throw new t.Z("portal:invalid-layer-item-typekeyword","'Group Layer' item without 'Map' type keyword is not supported");return async function(e){const a=e.portalItem,r=await a.fetchData("json");if(!r)return;const t=(0,y.wk)(a);e.read(r,t),await(0,s.k)(e,r,{context:t}),e.resourceReferences={portalItem:a,paths:t.readResourcePaths??[]}}(e)}return e.read({title:o},a),async function(e,a){let r;const{portalItem:n}=e;if(!n)return;const s=n.type,o=a.layerModuleTypeMap;switch(s){case"Feature Service":case"Feature Collection":r=o.FeatureLayer;break;case"Stream Service":r=o.StreamLayer;break;case"Scene Service":r=o.SceneLayer;break;default:throw new t.Z("portal:unsupported-item-type-as-group",`The item type '${s}' is not supported as a 'IGroupLayer'`)}const c=new l.L;let[y,d]=await Promise.all([r(),S(a,c)]),p=()=>y;if("Feature Service"===s){d=n.url?await(0,u.$O)(d,n.url,c):{};const a=(0,u.XX)(d),r=(0,u._Y)(d),t=[];if(a.length||r?.length){a.length&&t.push("SubtypeGroupLayer"),r?.length&&t.push("OrientedImageryLayer");const e=[];for(const a of t){const r=o[a];e.push(r())}const n=await Promise.all(e),i=new Map;t.forEach(((e,a)=>{i.set(e,n[a])})),p=e=>e.layerType?i.get(e.layerType)??y:y}const l=await async function(e){const{layersJSON:a}=await(0,i.V)(e);if(!a)return null;const r=[...a.layers,...a.tables];return e=>r.find((a=>a.id===e.id))}(n.url);return await m(e,p,d,l)}return"Scene Service"===s&&n.url&&(d=await(0,u.CD)(n,d,c)),(0,u.Q4)(d)>0?await m(e,p,d):await async function(e,a){const{portalItem:r}=e;if(!r?.url)return;const t=await(0,f.T)(r.url);t&&m(e,a,{layers:t.layers?.map(u.bS),tables:t.tables?.map(u.bS)})}(e,p)}(e,r)}(r,L,e);o&&r.read({url:o},L);const w=new l.L,h=await S(e,w,a);return h&&r.read(h,L),r.resourceReferences={portalItem:n,paths:L.readResourcePaths??[]},"subtype-group"!==r.type&&r.read({title:c},L),(0,p.y)(r,L)}(e,a)}async function m(e,a,r,t){let n=r.layers||[];const i=r.tables||[];if("Feature Collection"===e.portalItem?.type?(n.forEach(((e,a)=>{e.id=a,"Table"===e?.layerDefinition?.type&&i.push(e)})),n=n.filter((e=>"Table"!==e?.layerDefinition?.type))):(n.reverse(),i.reverse()),n.forEach((n=>{const i=t?.(n);if(i||!t){const t=w(e,a(n),r,n,i);e.add(t)}})),i.length){const a=await o.T.FeatureLayer();i.forEach((n=>{const i=t?.(n);if(i||!t){const t=w(e,a,r,n,i);e.tables.add(t)}}))}}function w(e,a,r,t,n){const i=e.portalItem,l={portalItem:i.clone(),layerId:t.id};null!=t.url&&(l.url=t.url);const s=new a(l);if("sourceJSON"in s&&(s.sourceJSON=n),"subtype-group"!==s.type&&(s.sublayerTitleMode="service-name"),"Feature Collection"===i.type){const e={origin:"portal-item",portal:i.portal||c.Z.getDefault()};s.read(t,e);const a=r.showLegend;null!=a&&s.read({showLegend:a},e)}return s}async function S(e,a,r){if(!1===e.supportsData)return;const t=e.instance,i=t.portalItem;if(!i)return;let l=null;try{l=await i.fetchData("json",r)}catch(e){}if(function(e){return"stream"!==e.type&&"layerId"in e}(t)){let e=null;const r=await async function(e,a,r){if(a?.layers&&a?.tables)return(0,u.Q4)(a);const t=(0,n.Qc)(e.url);if(!t)return 1;const i=await r.fetchServiceMetadata(t.url.path).catch((()=>null));return(a?.layers?.length??i?.layers?.length??0)+(a?.tables?.length??i?.tables?.length??0)}(i,l,a);if((l?.layers||l?.tables)&&r>0){if(null==t.layerId){const e=(0,u.XX)(l);t.layerId="subtype-group"===t.type?e?.[0]:(0,u.Ok)(l)}e=function(e,a){const{layerId:r}=a,t=e.layers?.find((e=>e.id===r))||e.tables?.find((e=>e.id===r));return t&&function(e,a){return!("feature"===a.type&&"layerType"in e&&"SubtypeGroupLayer"===e.layerType||"subtype-group"===a.type&&!("layerType"in e))}(t,a)?t:null}(l,t),e&&null!=l.showLegend&&(e.showLegend=l.showLegend)}return r>1&&"sublayerTitleMode"in t&&"service-name"!==t.sublayerTitleMode&&(t.sublayerTitleMode="item-title-and-service-name"),e}return l}},3072:(e,a,r)=>{r.d(a,{$O:()=>i,CD:()=>y,Ok:()=>l,Q4:()=>s,XX:()=>o,_Y:()=>c,bS:()=>n});var t=r(71592);function n(e){const a={id:e.id,name:e.name};return"Oriented Imagery Layer"===e.type&&(a.layerType="OrientedImageryLayer"),a}async function i(e,a,r){if(null==e?.layers||null==e?.tables){const t=await r.fetchServiceMetadata(a);(e=e||{}).layers=e.layers||t?.layers?.map(n),e.tables=e.tables||t?.tables?.map(n)}return e}function l(e){const a=e.layers;if(a?.length)return a[0].id;const r=e.tables;return r?.length?r[0].id:null}function s(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function o(e){const a=[];return e?.layers?.forEach((e=>{"SubtypeGroupLayer"===e.layerType&&a.push(e.id)})),a}function c(e){return e?.layers?.filter((({layerType:e})=>"OrientedImageryLayer"===e)).map((({id:e})=>e))}async function y(e,a,r){if(!e?.url)return a??{};if(a??={},!a.layers){const t=await r.fetchServiceMetadata(e.url);a.layers=t.layers?.map(n)}const{serverUrl:i,portalItem:l}=await(0,t.w)(e.url,{sceneLayerItem:e}).catch((()=>({serverUrl:null,portalItem:null})));if(null==i)return a.tables=[],a;if(!a.tables&&l){const e=await l.fetchData();if(e?.tables)a.tables=e.tables.map(n);else{const e=await r.fetchServiceMetadata(i);a.tables=e?.tables?.map(n)}}if(a.tables)for(const e of a.tables)e.url=`${i}/${e.id}`;return a}},28008:(e,a,r)=>{r.d(a,{fromItem:()=>u,v:()=>d});var t=r(20102),n=r(71592),i=r(7335),l=r(84230),s=r(87344),o=r(15235),c=r(3072),y=r(14661);async function u(e){!e.portalItem||e.portalItem instanceof o.default||(e={...e,portalItem:new o.default(e.portalItem)});const a=await async function(e){await e.load();const a=new i.L;return async function(e){const a=e.className,r=s.T[a];return{constructor:await r(),properties:e.properties}}(await d(e,a))}(e.portalItem);return new(0,a.constructor)({portalItem:e.portalItem,...a.properties})}async function d(e,a){switch(e.type){case"Map Service":return async function(e,a){return await async function(e,a){return(await a.fetchServiceMetadata(e.url)).tileInfo}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Feature Service":return async function(e,a){const r=await p(e,a);if("object"==typeof r){const e={};return null!=r.id&&(e.layerId=r.id),{className:r.className||"FeatureLayer",properties:e}}return{className:"GroupLayer"}}(e,a);case"Feature Collection":return async function(e){await e.load();const a=(0,y._$)(e,"Map Notes"),r=(0,y._$)(e,"Markup");if(a||r)return{className:"MapNotesLayer"};if((0,y._$)(e,"Route Layer"))return{className:"RouteLayer"};const t=await e.fetchData();return 1===(0,c.Q4)(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Scene Service":return async function(e,a){const r=await p(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:r}=await(0,n.w)(e.url,{sceneLayerItem:e}),t=await a.fetchServiceMetadata(r);return t?.tables??[]}catch{return[]}}));if("object"==typeof r){const t={};let n;if(null!=r.id?(t.layerId=r.id,n=`${e.url}/layers/${r.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.fb))if(e.typeKeywords.includes(a))return{className:l.fb[a]};const i=await a.fetchServiceMetadata(n);return{className:l.fb[i?.layerType]||"SceneLayer",properties:t}}if(!1===r){const r=await a.fetchServiceMetadata(e.url);if("Voxel"===r?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Image Service":return async function(e,a){await e.load();const r=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(r.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(r.includes("tiled imagery"))return{className:"ImageryTileLayer"};const t=await e.fetchData(),n=t?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const i=await a.fetchServiceMetadata(e.url),l=i.cacheType?.toLowerCase(),s=i.capabilities?.toLowerCase().includes("tilesonly");return"map"===l||s?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"Stream Service":case"Feed":return{className:"StreamLayer"};case"Vector Tile Service":return{className:"VectorTileLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"CSV":return{className:"CSVLayer"};case"KML":return{className:"KMLLayer"};case"WFS":return{className:"WFSLayer"};case"WMTS":return{className:"WMTSLayer"};case"WMS":return{className:"WMSLayer"};case"Group Layer":return{className:"GroupLayer"};default:throw new t.Z("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function p(e,a,r){const t=e.url;if(!t||/\/\d+$/.test(t))return{};await e.load();let n=await e.fetchData();if("Feature Service"===e.type){const e=await(0,c.$O)(n,t,a),r=f(e);if("object"==typeof r){const a=(0,c.XX)(e),t=(0,c._Y)(e);r.className=null!=r.id&&a.includes(r.id)?"SubtypeGroupLayer":null!=r.id&&t?.includes(r.id)?"OrientedImageryLayer":"FeatureLayer"}return r}if("Scene Service"===e.type&&(n=await(0,c.CD)(e,n,a)),(0,c.Q4)(n)>0)return f(n);const i=await a.fetchServiceMetadata(t);return r&&(i.tables=await r()),f(i)}function f(e){return 1===(0,c.Q4)(e)&&{id:(0,c.Ok)(e)}}},40555:(e,a,r)=>{r.d(a,{y:()=>l});var t=r(66643),n=r(95330),i=r(20941);async function l(e,a,r){const l=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(l&&"unique-value"===l.type&&l.styleOrigin){const s=await(0,t.q6)(l.populateFromStyle());if((0,n.k_)(r),!1===s.ok){const r=s.error;a?.messages&&a.messages.push(new i.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:a})),e.clear("renderer",a?.origin)}}}},96187:(e,a,r)=>{r.d(a,{T:()=>n});var t=r(3172);async function n(e,a){const{data:r}=await(0,t.Z)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}}}]);