@arcgis/core 4.32.0-next.20241218 → 4.32.0-next.20241219

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 (166) hide show
  1. package/Basemap.js +1 -1
  2. package/arcade.js +1 -1
  3. package/assets/components/assets/text-area/t9n/messages.en.json +1 -1
  4. package/assets/components/assets/text-area/t9n/messages.json +1 -1
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/{57aa1fcef6587305b347.js → 0191142d5f55cc8cf37a.js} +93 -93
  7. package/assets/esri/core/workers/chunks/{7a0ddaf2c279a2d24c86.js → 0837a630e12a21fc2e50.js} +1 -1
  8. package/assets/esri/core/workers/chunks/0b3e1e903120da297641.js +1 -0
  9. package/assets/esri/core/workers/chunks/{6ceafd4420d21110d820.js → 0da2aaca3f0b4fe910e3.js} +1 -1
  10. package/assets/esri/core/workers/chunks/0f1a7aeec18db5323365.js +1 -0
  11. package/assets/esri/core/workers/chunks/{cca47dab8c1b8ae49fab.js → 11052103efe3d53a784e.js} +1 -1
  12. package/assets/esri/core/workers/chunks/19d72185d50ba1ebff50.js +1 -0
  13. package/assets/esri/core/workers/chunks/{b99de19b6930ba6dad98.js → 1d8609ba413e8a172719.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{d05fab1af651b7e92442.js → 23fe65988dbc9e5d7842.js} +1 -1
  15. package/assets/esri/core/workers/chunks/2427a01678f3d9fbf30b.js +1 -0
  16. package/assets/esri/core/workers/chunks/3a90163b76b0bc7f21d2.js +1 -0
  17. package/assets/esri/core/workers/chunks/3ef5002b21b1a5b97e11.js +1 -0
  18. package/assets/esri/core/workers/chunks/48266c87363e7dcaefb3.js +1 -0
  19. package/assets/esri/core/workers/chunks/{d3790bd1a644eae1005b.js → 48f6eb3b63fec1d3312d.js} +4 -5
  20. package/assets/esri/core/workers/chunks/668679baf519ada9ae28.js +1 -0
  21. package/assets/esri/core/workers/chunks/7156d2ae914e1add0109.js +1 -0
  22. package/assets/esri/core/workers/chunks/737f381f2cfeddb96d15.js +1 -0
  23. package/assets/esri/core/workers/chunks/{b77d294ad7064734d015.js → 741d5dadfab2a7689054.js} +1 -1
  24. package/assets/esri/core/workers/chunks/756c2f7c8659deab6c96.js.LICENSE.txt +1 -1
  25. package/assets/esri/core/workers/chunks/{1cee35ea0a80737730d5.js → 770d233254419b741616.js} +1 -1
  26. package/assets/esri/core/workers/chunks/8249351daa45ca82ca0c.js +1 -0
  27. package/assets/esri/core/workers/chunks/84d26c6c805f5855ffd3.js +1 -0
  28. package/assets/esri/core/workers/chunks/9372d08ba8bf3342c48f.js +1 -0
  29. package/assets/esri/core/workers/chunks/9cc9bac6e02ab241e852.js +1 -0
  30. package/assets/esri/core/workers/chunks/{d347dd19a37ba2f19970.js → 9fc49968dea8e2b64f3e.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{a0a37c238863ffc1b768.js → a4c8b773283ea8f0e256.js} +1 -1
  32. package/assets/esri/core/workers/chunks/a776f71b4c7b8728a973.js +1 -0
  33. package/assets/esri/core/workers/chunks/a77aa86896bbb0e088df.js +1 -0
  34. package/assets/esri/core/workers/chunks/{7c9e4d479d740723304b.js → b1e4813f0c73fc2a483c.js} +2 -2
  35. package/assets/esri/core/workers/chunks/{7c9e4d479d740723304b.js.LICENSE.txt → b1e4813f0c73fc2a483c.js.LICENSE.txt} +1 -1
  36. package/assets/esri/core/workers/chunks/bd37c9cc720587665fd3.js +1 -0
  37. package/assets/esri/core/workers/chunks/bf0a0ca7fdac98f06a89.js.LICENSE.txt +1 -1
  38. package/assets/esri/core/workers/chunks/cb3af81e1fe6405c4885.js +1 -0
  39. package/assets/esri/core/workers/chunks/cc427e8f1b17744b6ea4.js +1 -0
  40. package/assets/esri/core/workers/chunks/cfe4b8101ea96d6996d3.js +2 -0
  41. package/assets/esri/core/workers/chunks/{f3f5c5138de8428bd30f.js.LICENSE.txt → cfe4b8101ea96d6996d3.js.LICENSE.txt} +1 -1
  42. package/assets/esri/core/workers/chunks/d7b76bc7bff34abc2253.js +1 -0
  43. package/assets/esri/core/workers/chunks/dd34df14eb4940e2497b.js +1 -0
  44. package/assets/esri/core/workers/chunks/dfd9432ba01881d0a4d9.js +2 -0
  45. package/assets/esri/core/workers/chunks/{ed2ebe42d6483470939a.js.LICENSE.txt → dfd9432ba01881d0a4d9.js.LICENSE.txt} +1 -1
  46. package/assets/esri/core/workers/chunks/e1913990f30d285b3b15.js +2 -0
  47. package/assets/esri/core/workers/chunks/{aff820b27ca9585e297e.js.LICENSE.txt → e1913990f30d285b3b15.js.LICENSE.txt} +1 -1
  48. package/assets/esri/core/workers/chunks/{e6490fe7c87c1d649ea6.js → e5d55a35dace70239902.js} +1 -1
  49. package/assets/esri/core/workers/chunks/ebf9caf2dc8af89afec2.js +2 -0
  50. package/assets/esri/core/workers/chunks/{2eb36a16de1a823513cd.js.LICENSE.txt → ebf9caf2dc8af89afec2.js.LICENSE.txt} +1 -1
  51. package/assets/esri/core/workers/chunks/f25c04cf1a4bc1d2636a.js +1 -0
  52. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  53. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  54. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  55. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  56. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  57. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  58. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  59. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  60. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  61. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  62. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  63. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  64. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  65. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  66. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  67. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  68. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  69. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  70. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  71. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  72. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  73. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  74. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  75. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  76. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  77. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  78. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  79. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  80. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  81. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  82. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  83. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  84. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  85. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  86. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  87. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  88. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  89. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  90. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  91. package/chunks/HUDMaterial.glsl.js +41 -42
  92. package/chunks/OITBlend.glsl.js +3 -3
  93. package/chunks/QuadraticBezier.js +1 -1
  94. package/chunks/chartUtilsAm5.js +1 -1
  95. package/core/number.js +1 -1
  96. package/geometry/operators/gx/operatorOffset.js +1 -1
  97. package/geometry/operators/support/jsonConverter.js +1 -1
  98. package/interfaces.d.ts +967 -731
  99. package/intl/messages.js +1 -1
  100. package/package.json +2 -2
  101. package/renderers/support/RendererLegendOptions.js +1 -1
  102. package/rest/featureService/utils.js +1 -1
  103. package/rest/support/AddressToLocationsParameters.js +1 -1
  104. package/rest/support/LocationToAddressParameters.js +1 -1
  105. package/smartMapping/popup/classBreaks.js +1 -1
  106. package/smartMapping/popup/clusters.js +1 -1
  107. package/smartMapping/popup/dotDensity.js +1 -1
  108. package/smartMapping/popup/heatmap.js +1 -1
  109. package/smartMapping/popup/predominance.js +1 -1
  110. package/smartMapping/popup/relationship.js +1 -1
  111. package/smartMapping/popup/simple.js +1 -1
  112. package/smartMapping/popup/support/utils.js +1 -1
  113. package/smartMapping/popup/templates.js +1 -1
  114. package/smartMapping/popup/uniqueValues.js +1 -1
  115. package/smartMapping/raster/renderers/flow.js +1 -1
  116. package/smartMapping/renderers/pieChart.js +1 -1
  117. package/smartMapping/symbology/support/utils.js +1 -1
  118. package/support/BasemapStyle.js +1 -1
  119. package/support/revision.js +1 -1
  120. package/versionManagement/versionAdapters/utils.js +1 -1
  121. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  122. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  123. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  124. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  125. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  126. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  127. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  128. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +2 -2
  129. package/views/3d/webgl.js +1 -1
  130. package/views/SelectionManager.js +1 -1
  131. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  132. package/widgets/Directions/DirectionsViewModel.js +1 -1
  133. package/widgets/Features.js +1 -1
  134. package/widgets/LayerList/LayerListItem.js +1 -1
  135. package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
  136. package/widgets/support/widget.js +1 -1
  137. package/widgets/support/widgetUtils.js +1 -1
  138. package/applications/Components/CollectionFlattener.d.ts +0 -4
  139. package/applications/Components/CollectionFlattener.js +0 -5
  140. package/assets/esri/core/workers/chunks/062da071fd27022f6cb1.js +0 -1
  141. package/assets/esri/core/workers/chunks/0f0cc8150326ca7bcd6f.js +0 -1
  142. package/assets/esri/core/workers/chunks/1808a2b023fa04c6ee6c.js +0 -1
  143. package/assets/esri/core/workers/chunks/1d31b07805af85a4ba7b.js +0 -1
  144. package/assets/esri/core/workers/chunks/1fb142a533e4ee492a50.js +0 -1
  145. package/assets/esri/core/workers/chunks/28f3e139a4e3b70d84a4.js +0 -1
  146. package/assets/esri/core/workers/chunks/2daf5f46e4b137d33f12.js +0 -1
  147. package/assets/esri/core/workers/chunks/2eb36a16de1a823513cd.js +0 -2
  148. package/assets/esri/core/workers/chunks/382c3da5ce9b3231f57c.js +0 -1
  149. package/assets/esri/core/workers/chunks/433798a25dd688cef327.js +0 -1
  150. package/assets/esri/core/workers/chunks/56a04f5976b926de448e.js +0 -1
  151. package/assets/esri/core/workers/chunks/6bd6c280c741f8917cc8.js +0 -1
  152. package/assets/esri/core/workers/chunks/70153bb44fd5b7cfecb8.js +0 -1
  153. package/assets/esri/core/workers/chunks/78981dee7b5403c32517.js +0 -1
  154. package/assets/esri/core/workers/chunks/7bb52be0a02fb2a2631c.js +0 -1
  155. package/assets/esri/core/workers/chunks/80f1f967646f7a7d37ec.js +0 -1
  156. package/assets/esri/core/workers/chunks/820bb7ea30ad30ce8f42.js +0 -1
  157. package/assets/esri/core/workers/chunks/95ea191f6a307b73b545.js +0 -1
  158. package/assets/esri/core/workers/chunks/9fab71f1041c40d976af.js +0 -1
  159. package/assets/esri/core/workers/chunks/aa31073c7fe3b0e4e499.js +0 -1
  160. package/assets/esri/core/workers/chunks/af5d74311cec22601f73.js +0 -1
  161. package/assets/esri/core/workers/chunks/aff820b27ca9585e297e.js +0 -2
  162. package/assets/esri/core/workers/chunks/bf2d1a700fff4ae0db33.js +0 -1
  163. package/assets/esri/core/workers/chunks/da6c0c894e7e281169fa.js +0 -1
  164. package/assets/esri/core/workers/chunks/ed2ebe42d6483470939a.js +0 -2
  165. package/assets/esri/core/workers/chunks/f3f5c5138de8428bd30f.js +0 -2
  166. package/assets/esri/core/workers/chunks/f429d95eb986f3d215f3.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5456],{68197:(e,t,r)=>{r.d(t,{A:()=>u});var n,i,s=r(40876),o=r(34727),a=r(56507);function l(e){return(0,o.qE)((0,a.Vr)(e),0,255)}function c(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}function f(e,t){const r=e.toString(16).padStart(2,"0");return t?r.slice(0,1):r}class h{static blendColors(e,t,r,n=new h){return n.r=Math.round(e.r+(t.r-e.r)*r),n.g=Math.round(e.g+(t.g-e.g)*r),n.b=Math.round(e.b+(t.b-e.b)*r),n.a=e.a+(t.a-e.a)*r,n._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),n=r[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),h.fromArray(r,t)}return h.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return h.fromArray((0,s.z$)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new h){if("#"!==e[0]||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const r=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),i=parseInt(e.slice(3,4),16),s=5===e.length?15:parseInt(e.slice(4),16);return h.fromArray([r+16*r,n+16*n,i+16*i,(s+16*s)/255],t)}case 7:case 9:{const r=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16),s=7===e.length?255:parseInt(e.slice(7),16);return h.fromArray([r,n,i,s/255],t)}default:return null}}static fromArray(e,t=new h){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,s.V6)(e)?(0,s.TS)(e):null;return r&&h.fromArray(r,t)||h.fromRgb(e,t)||h.fromHex(e,t)}static fromJSON(e){return null!=e?new h([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?h.fromString(e,this):Array.isArray(e)?h.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof h||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,r=e?.digits??6,n=3===r||4===r,i=4===r||8===r,s=`#${f(this.r,n)}${f(this.g,n)}${f(this.b,n)}${i?f(Math.round(255*this.a),n):""}`;return t?s.toUpperCase():s}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=h.AlphaMode.ALWAYS){const t=l(this.r),r=l(this.g),n=l(this.b);return e===h.AlphaMode.ALWAYS||1!==this.a?[t,r,n,l(255*this.a)]:[t,r,n]}clone(){return new h(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(c(this.r,0,255)),this.g=Math.round(c(this.g,0,255)),this.b=Math.round(c(this.b,0,255)),this.a=c(this.a,0,1),this}_set(e,t,r,n){this.r=e,this.g=t,this.b=r,this.a=n}}h.prototype.declaredClass="esri.Color",(i=(n=h||(h={})).AlphaMode||(n.AlphaMode={}))[i.ALWAYS=0]="ALWAYS",i[i.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const u=h},73354:(e,t,r)=>{r.d(t,{a:()=>h,b:()=>a,c:()=>o,d:()=>i,e:()=>u,f:()=>f,l:()=>c,n:()=>d,t:()=>s});var n=r(40876);function i(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,n=3,i=n){if(e.length/n!==Math.ceil(t.length/i))return e;const s=e.length/n,o=r[0],a=r[1],l=r[2],c=r[4],f=r[5],h=r[6],u=r[8],d=r[9],p=r[10],m=r[12],g=r[13],y=r[14];let b=0,_=0;for(let r=0;r<s;r++){const r=t[b],s=t[b+1],A=t[b+2];e[_]=o*r+c*s+u*A+m,e[_+1]=a*r+f*s+d*A+g,e[_+2]=l*r+h*s+p*A+y,b+=i,_+=n}return e}function o(e,t,r){a(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function a(e,t,r,n=3,i=n){if(e.length/n!==Math.ceil(t.length/i))return;const s=e.length/n,o=r[0],a=r[1],l=r[2],c=r[3],f=r[4],h=r[5],u=r[6],d=r[7],p=r[8];let m=0,g=0;for(let r=0;r<s;r++){const r=t[m],s=t[m+1],y=t[m+2];e[g]=o*r+c*s+u*y,e[g+1]=a*r+f*s+d*y,e[g+2]=l*r+h*s+p*y,m+=i,g+=n}}function l(e,t,r,n=3,i=n){const s=Math.min(e.length/n,t.length/i);let o=0,a=0;for(let l=0;l<s;l++)e[a]=r*t[o],e[a+1]=r*t[o+1],e[a+2]=r*t[o+2],o+=i,a+=n;return e}function c(e,t,r,n){f(e.typedBuffer,t.typedBuffer,r,n,e.typedBufferStride,t.typedBufferStride)}function f(e,t,r,i,s=3,o=s){const a=Math.min(e.length/s,t.length/o);let l=0,c=0;const f=1/n.Tf;for(let n=0;n<a;n++)e[c]=i*(r*t[l])**f,e[c+1]=i*(r*t[l+1])**f,e[c+2]=i*(r*t[l+2])**f,l+=o,c+=s}function h(e,t,r,n=3,i=n){const s=e.length/n;if(s!==Math.ceil(t.length/i))return e;let o=0,a=0;for(let l=0;l<s;l++)e[a]=t[o]+r[0],e[a+1]=t[o+1]+r[1],e[a+2]=t[o+2]+r[2],o+=i,a+=n;return e}function u(e,t){d(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function d(e,t,r=3,n=r){const i=Math.min(e.length/r,t.length/n);let s=0,o=0;for(let a=0;a<i;a++){const i=t[s],a=t[s+1],l=t[s+2],c=i*i+a*a+l*l;if(c>0){const t=1/Math.sqrt(c);e[o]=t*i,e[o+1]=t*a,e[o+2]=t*l}s+=n,o+=r}}r(44208),r(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:f,linearToSRGBView:c,normalize:d,normalizeView:u,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const n=Math.min(e.count,t.count),i=e.typedBuffer,s=e.typedBufferStride,o=t.typedBuffer,a=t.typedBufferStride;let l=0,c=0;for(let e=0;e<n;e++)i[c]=o[l]>>r,i[c+1]=o[l+1]>>r,i[c+2]=o[l+2]>>r,l+=a,c+=s},transformMat3:a,transformMat3View:o,transformMat4:s,transformMat4View:i,translate:h},Symbol.toStringTag,{value:"Module"}))},21818:(e,t,r)=>{function n(e){}r.d(t,{Xb:()=>n}),r(44208)},35982:(e,t,r)=>{r.d(t,{B:()=>l});var n=r(4576),i=r(36563),s=r(53966),o=r(74887),a=r(29953);class l{constructor(e,t,r,n,i={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._promise=(0,a.ho)(e,{...i,schedule:n}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>s.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,i.hA)((()=>{r.removed=!0,(0,n.TF)(this._listeners,r),this._thread&&null!=r.threadHandle&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const n=this._transferLists[e],i=n?n(t):[];return this._thread.invoke(e,t,{transferList:i,signal:r})}return this._promise?this._promise.then((()=>((0,o.Te)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}},95696:(e,t,r)=>{r.d(t,{A:()=>h});var n,i=r(90237),s=r(69540),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),c=r(40608);let f=n=class extends(s.A.ClonableMixin(o.A)){constructor(e){super(e),this.type="georeferenced",this.origin=null}};f.absolute=new n,(0,i._)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],f.prototype,"type",void 0),(0,i._)([(0,a.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],f.prototype,"origin",void 0),f=n=(0,i._)([(0,c.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],f);const h=f},18251:(e,t,r)=>{r.d(t,{A:()=>h});var n=r(90237),i=r(69540),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),l=r(40608),c=r(51850);let f=class extends(i.A.ClonableMixin(s.A)){constructor(e){super(e),this.type="local",this.origin=(0,c.vt)()}};(0,n._)([(0,a.e)({local:"local"},{readOnly:!0})],f.prototype,"type",void 0),(0,n._)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],f.prototype,"origin",void 0),f=(0,n._)([(0,l.$)("esri.geometry.support.MeshLocalVertexSpace")],f);const h=f},36233:(e,t,r)=>{r.r(t),r.d(t,{destroyContext:()=>F,dracoDecompressPointCloudData:()=>N,filterObbsForModifications:()=>B,filterObbsForModificationsSync:()=>T,initialize:()=>D,interpretObbModificationResults:()=>O,process:()=>v,project:()=>C,setLegacySchema:()=>E,setModifications:()=>L,setModificationsSync:()=>P,test:()=>z,transformNormals:()=>R});var n,i,s=r(34727),o=r(16930),a=r(95696),l=r(18251),c=r(73354);!function(e){e[e.None=0]="None",e[e.Int16=1]="Int16",e[e.Int32=2]="Int32"}(n||(n={})),function(e){e[e.Replace=0]="Replace",e[e.Outside=1]="Outside",e[e.Inside=2]="Inside",e[e.Finished=3]="Finished"}(i||(i={}));var f=r(2741);function h(e){return(0,f.s)(`esri/libs/i3s/${e}`)}let u;r(53966);var d,p,m,g,y,b,_=r(3694),A=r(51850),w=r(35982);r(57251),r(27993);class S{constructor(e,t,r,n,i,s){this.layout=e,this.interleavedVertexData=t,this.indices=r,this.hasColors=n,this.hasModifications=i,this.positionData=s}}class M{constructor(e,t,r,n,i,s,o){this.componentOffsets=e,this.featureIds=t,this.anchorIds=r,this.anchors=n,this.transformedGeometry=i,this.globalTrafo=s,this.obb=o}}async function v(e){I=await $();const t=[e.geometryBuffer];return{result:x(I,e,t),transferList:t}}async function N(e){I=await $();const t=[e.geometryBuffer],{geometryBuffer:r}=e,n=r.byteLength,i=I._malloc(n),s=new Uint8Array(I.HEAPU8.buffer,i,n);s.set(new Uint8Array(r));const o=I.dracoDecompressPointCloudData(i,s.byteLength);if(I._free(i),o.error.length>0)throw new Error(`i3s.wasm: ${o.error}`);const a=o.featureIds?.length>0?o.featureIds.slice():null,l=o.positions.slice();return a&&t.push(a.buffer),t.push(l.buffer),{result:{positions:l,featureIds:a},transferList:t}}async function B(e){await $(),T(e);const t={buffer:e.buffer};return{result:t,transferList:[t.buffer]}}async function L(e){await $(),P(e)}async function E(e){I=await $(),I.setLegacySchema(e.context,e.jsonSchema)}async function C(e){const{localMatrix:t,origin:n,positions:i,vertexSpace:s}=e,c=o.A.fromJSON(e.inSpatialReference),f=o.A.fromJSON(e.outSpatialReference);let h;const[{projectBuffer:u},{initializeProjection:d}]=await Promise.all([Promise.resolve().then(r.bind(r,9762)),Promise.resolve().then(r.bind(r,57251))]);await d(c,f);const p=[0,0,0];if(!u(n,c,0,p,f,0))throw new Error("Failed to project");if("georeferenced"===s.type&&null==s.origin){if(h=new Float64Array(i.length),!u(i,c,0,h,f,0,h.length/3))throw new Error("Failed to project")}else{const e="georeferenced"===s.type?a.A.fromJSON(s):l.A.fromJSON(s),{projectMeshVertexPositions:n}=await Promise.all([r.e(3030),r.e(4594)]).then(r.bind(r,74594)),o=n({vertexAttributes:{position:i},transform:t?{localMatrix:t}:void 0,vertexSpace:e,spatialReference:c},f);if(!o)throw new Error("Failed to project");h=o}const m=h.length,[g,y,b]=p;for(let e=0;e<m;e+=3)h[e]-=g,h[e+1]-=y,h[e+2]-=b;return{result:{projected:h,original:i,projectedOrigin:p},transferList:[h.buffer,i.buffer]}}async function R({normalMatrix:e,normals:t}){const r=new Float32Array(t.length);return(0,c.b)(r,t,e),(0,s.or)(e)&&(0,c.n)(r,r),{result:{transformed:r,original:t},transferList:[r.buffer,t.buffer]}}function F(e){k(e)}let U,I;function P(e){if(!I)return;const t=e.modifications,r=I._malloc(8*t.length),n=new Float64Array(I.HEAPU8.buffer,r,t.length);for(let e=0;e<t.length;++e)n[e]=t[e];I.setModifications(e.context,r,t.length,e.isGeodetic),I._free(r)}function x(e,t,r){const{context:i,globalTrafo:s,mbs:o,obbData:a,elevationOffset:l,geometryBuffer:c,geometryDescriptor:f,indexToVertexProjector:h,vertexToRenderProjector:u}=t,d=e._malloc(c.byteLength),p=e._malloc(33*Float64Array.BYTES_PER_ELEMENT),m=new Uint8Array(e.HEAPU8.buffer,d,c.byteLength);m.set(new Uint8Array(c));const g=new Float64Array(e.HEAPU8.buffer,p,33);j(g,[NaN,NaN,NaN]);let y=g.byteOffset+3*g.BYTES_PER_ELEMENT,b=new Float64Array(g.buffer,y);j(b,s),y+=16*g.BYTES_PER_ELEMENT,b=new Float64Array(g.buffer,y),j(b,o),y+=4*g.BYTES_PER_ELEMENT,a&&(b=new Float64Array(g.buffer,y),j(b,a));const _=f,A={isDraco:!1,isLegacy:!1,color:t.layouts.some((e=>e.some((e=>"color"===e.name)))),normal:t.needNormals&&t.layouts.some((e=>e.some((e=>"normalCompressed"===e.name)))),uv0:t.layouts.some((e=>e.some((e=>"uv0"===e.name)))),uvRegion:t.layouts.some((e=>e.some((e=>"uvRegion"===e.name)))),featureIndex:_.featureIndex},w=e.process(i,!!t.obbData,d,m.byteLength,_,A,p,l,h,u,t.normalReferenceFrame);if(e._free(p),e._free(d),w.error.length>0)throw new Error(`i3s.wasm: ${w.error}`);if(w.discarded)return null;const v=w.componentOffsets.length>0?w.componentOffsets.slice():null,N=w.featureIds.length>0?w.featureIds.slice():null,B=w.anchorIds.length>0?Array.from(w.anchorIds):null,L=w.anchors.length>0?Array.from(w.anchors):null,E=w.interleavedVertedData.slice().buffer,C=w.indicesType===n.Int16?new Uint16Array(w.indices.buffer,w.indices.byteOffset,w.indices.byteLength/2).slice():new Uint32Array(w.indices.buffer,w.indices.byteOffset,w.indices.byteLength/4).slice(),R=w.positions.slice(),{buffer:F,byteOffset:U,byteLength:I}=w.positionIndices,P=w.positionIndicesType===n.Int16?new Uint16Array(F,U,I/2).slice():new Uint32Array(F,U,I/4).slice(),x=new S(t.layouts[0],E,C,w.hasColors,w.hasModifications,{data:R,indices:P});return N&&r.push(N.buffer),v&&r.push(v.buffer),r.push(E),r.push(C.buffer),r.push(R.buffer),r.push(P.buffer),new M(v,N,B,L,x,s,w.obb)}function O(e){return 0===e?p.Unmodified:1===e?p.PotentiallyModified:2===e?p.Culled:p.Unknown}function T(e){if(!I)return;const{context:t,buffer:r}=e,n=I._malloc(r.byteLength),i=r.byteLength/Float64Array.BYTES_PER_ELEMENT,s=new Float64Array(I.HEAPU8.buffer,n,i),o=new Float64Array(r);s.set(o),I.filterOBBs(t,n,i),o.set(s),I._free(n)}function k(e){I&&0===I.destroy(e)&&(I=null)}function j(e,t){for(let r=0;r<t.length;++r)e[r]=t[r]}async function D(){I||await $()}function $(){return I?Promise.resolve(I):(U||(U=(u||(u=new Promise((e=>r.e(2980).then(r.bind(r,82980)).then((e=>e.i)).then((({default:t})=>{const r=t({locateFile:h,onRuntimeInitialized:()=>e(r)});delete r.then})))).catch((e=>{throw e}))),u).then((e=>(I=e,U=null,I)))),U)}w.B,new _.A({deallocator:null}),(0,A.vt)(),r(91829),r(97937),r(4654),(b=d||(d={}))[b.Unmodified=0]="Unmodified",b[b.Culled=1]="Culled",b[b.NotChecked=2]="NotChecked",function(e){e[e.Unmodified=0]="Unmodified",e[e.PotentiallyModified=1]="PotentiallyModified",e[e.Culled=2]="Culled",e[e.Unknown=3]="Unknown",e[e.NotChecked=4]="NotChecked"}(p||(p={})),function(e){e[e.Unknown=0]="Unknown",e[e.Uncached=1]="Uncached",e[e.Cached=2]="Cached"}(m||(m={})),function(e){e[e.None=0]="None",e[e.MaxScreenThreshold=1]="MaxScreenThreshold",e[e.ScreenSpaceRelative=2]="ScreenSpaceRelative",e[e.RemovedFeatureDiameter=3]="RemovedFeatureDiameter",e[e.DistanceRangeFromDefaultCamera=4]="DistanceRangeFromDefaultCamera"}(g||(g={})),function(e){e[e.Hole=0]="Hole",e[e.Leaf=1]="Leaf"}(y||(y={}));const z={transform:(e,t)=>I&&x(I,e,t),destroy:k}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6781,7136],{67482:(e,t,n)=>{function s(e){return null!=a(e)||null!=o(e)}function r(e){return l.test(e)}function i(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let n=!0;if(p&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,s=0;for(;!t&&s<=e.length;)t=!u.test(e[s]),s++;n=!t}}return n}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const n=t.groups,s=+n.year,r=+n.month-1,i=+n.day,o=+(n.hours??"0"),a=+(n.minutes??"0"),u=+(n.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const p=n.ms??"0",c=p?+p.padEnd(3,"0").slice(0,3):0;let d;if(n.isUTC||!n.offsetSign)d=Date.UTC(s,r,i,o,a,u,c);else{const e=+n.offsetHours,t=+n.offsetMinutes;d=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(s,r,i,o,a,u,c)}return Number.isNaN(d)?null:d}n.d(t,{Br:()=>r,Cq:()=>s,_U:()=>i});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,p=!Number.isNaN(new Date("technology 10").getTime())},14607:(e,t,n)=>{n.d(t,{B:()=>u,GP:()=>a,qg:()=>p});var s=n(799),r=n(73444);const i={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,r.JK)()){let t=(e=e.toLowerCase())in i;if(!t){const n=e.split("-");n.length>1&&n[0]in i&&(e=n[0],t=!0),t||(e="en")}const[n,s,o="#,##0.###"]=i[e];return{decimal:n,group:s,pattern:o}}function a(e,t){const n=o((t={...t}).locale);t.customs=n;const s=t.pattern||n.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,n){const s=(n=n||{}).customs.group,r=n.customs.decimal,i=t.split(";"),o=i[0];if((t=i[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,u=o.match(a);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===n.fractional&&(n.places=0),t.replace(a,function(e,t,n){!0===(n=n||{}).places&&(n.places=0),n.places===1/0&&(n.places=6);const s=t.split("."),r="string"==typeof n.places&&n.places.indexOf(",");let i=n.places;r?i=n.places.slice(r+1):+i>=0||(i=(s[1]||[]).length),n.round<0||(e=Number(e.toFixed(Number(i))));const o=String(Math.abs(e)).split("."),a=o[1]||"";if(s[1]||n.places){r&&(n.places=n.places.slice(0,Math.max(0,r)));const e=void 0!==n.places?n.places:s[1]&&s[1].lastIndexOf("0")+1;+e>a.length&&(o[1]=a.padEnd(Number(e),"0")),+i<a.length&&(o[1]=a.slice(0,Math.max(0,Number(i))))}else o[1]&&o.pop();const l=s[0].replace(",","");let u=l.indexOf("0");-1!==u&&(u=l.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),l.includes("#")||(o[0]=o[0].slice(-u)));let p,c,d=s[0].lastIndexOf(",");if(-1!==d){p=s[0].length-d-1;const e=s[0].slice(0,d);d=e.lastIndexOf(","),-1!==d&&(c=e.length-d-1)}const f=[];for(let e=o[0];e;){const t=e.length-p;f.push(t>0?e.slice(Math.max(0,t)):e),e=t>0?e.slice(0,t):"",c&&(p=c,c=void 0)}return o[0]=f.reverse().join(n.group||","),o.join(n.decimal||".")}(e,u[0],{decimal:r,group:s,places:n.places,round:n.round}))}(e,s,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),n=e.pattern||t.pattern,r=t.group,i=t.decimal;let a=1;if(n.includes("%"))a/=100;else if(n.includes("‰"))a/=1e3;else if(n.includes("¤"))throw new Error("currency notation not supported");const u=n.split(";");1===u.length&&u.push("-"+u[0]);const p=d(u,(t=>(t="(?:"+(0,s.Cj)(t,".")+")").replace(l,(t=>{const n={signed:!1,separator:e.strict?r:[r,""],fractional:e.fractional,decimal:i,exponent:!1},s=t.split(".");let o=e.places;1===s.length&&1!==a&&(s[1]="###"),1===s.length||0===o?n.fractional=!1:(void 0===o&&(o=e.pattern?s[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(n.fractional=!0),!e.places&&+o<s[1].length&&(o+=","+s[1].length),n.places=o);const l=s[0].split(",");return l.length>1&&(n.groupSize=l.pop().length,l.length>1&&(n.groupSize2=l.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=c(e),n=d(e.fractional,(t=>{let n="";return t&&0!==e.places&&(n="\\"+e.decimal,e.places===1/0?n="(?:"+n+"\\d+)?":n+="\\d{"+e.places+"}"),n}),!0);let s=t+n;return n&&(s="(?:(?:"+s+")|(?:"+n+"))"),s+d(e.exponent,(t=>t?"([eE]"+c({signed:e.eSigned})+")":""))}(n)+")"}))),!0);return{regexp:p.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:r,decimal:i,factor:a}}function p(e,t){const n=u(t),s=new RegExp("^"+n.regexp+"$").exec(e);if(!s)return NaN;let r=s[1];if(!s[1]){if(!s[2])return NaN;r=s[2],n.factor*=-1}return r=r.replaceAll(new RegExp("["+n.group+"\\s\\xa0]","g"),"").replace(n.decimal,"."),Number(r)*n.factor}function c(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,(e=>e?"[-+]":""),!0)+d(e.separator,(t=>{if(!t)return"(?:\\d+)";" "===(t=(0,s.Cj)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const n=e.groupSize,r=e.groupSize2;if(r){const e="(?:0|[1-9]\\d{0,"+(r-1)+"}(?:["+t+"]\\d{"+r+"})*["+t+"]\\d{"+n+"})";return n-r>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(n-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+t+"]\\d{"+n+"})*)"}),!0)}const d=(e,t,n)=>{if(!Array.isArray(e))return t(e);const s=[];for(let n=0;n<e.length;n++)s.push(t(e[n]));return f(s.join("|"),Boolean(n))},f=(e,t)=>"("+(t?"?:":"")+e+")"},17136:(e,t,n)=>{n.d(t,{el:()=>N});var s=n(92602),r=n(49186),i=n(53966),o=n(39829),a=n(82799),l=n(80754),u=n(21325),p=n(28735),c=(n(59456),n(78888)),d=n(65864),f=n(2272),h=n(84952),y=n(92300);const m=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function S(e){return"polyline"===e[0].type}function x(e,t,n){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m().error(e),new r.A(e)}const n=(0,l.r8)(e),s=[];for(const e of n){const n=[];s.push(n),n.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const r=e[s][0],i=e[s][1],o=e[s+1][0],a=e[s+1][1],l=Math.sqrt((o-r)*(o-r)+(a-i)*(a-i)),u=(a-i)/l,p=(o-r)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const s=e*t,o=p*s+r,a=u*s+i;n.push([o,a])}const e=(l+Math.floor(c-1)*t)/2,s=p*e+r,o=u*e+i;n.push([s,o])}n.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:s,spatialReference:e.spatialReference}):new a.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return n&&(e=(0,l.kS)(e,n)),e}function w(e,t,n){if(Array.isArray(e)){const s=e[0];if(s>t){const n=(0,l.kd)(s,t);e[0]=s+n*(-2*t)}else if(s<n){const t=(0,l.kd)(s,n);e[0]=s+t*(-2*n)}}else{const s=e.x;if(s>t){const n=(0,l.kd)(s,t);e=e.clone().offset(n*(-2*t),0)}else if(s<n){const t=(0,l.kd)(s,n);e=e.clone().offset(t*(-2*n),0)}}return e}function F(e,t){let n=-1;for(let s=0;s<t.cutIndexes.length;s++){const r=t.cutIndexes[s],i=t.geometries[s],o=(0,l.r8)(i);for(let e=0;e<o.length;e++){const t=o[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const s=t[e][0];n=s>n?s:n}n=Number(n.toFixed(9));const s=-360*(0,l.kd)(n,180);for(let n=0;n<t.length;n++){const t=i.getPoint(e,n);i.setPoint(e,n,t.clone().offset(s,0))}return!0}}))}if(r===n){if(g(e))for(const t of(0,l.r8)(i))e[r]=e[r].addRing(t);else if(S(e))for(const t of(0,l.r8)(i))e[r]=e[r].addPath(t)}else n=r,e[r]=i}return e}async function N(e,t,n){if(!Array.isArray(e))return N([e],t);t&&"string"!=typeof t&&m().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let i,g,S,A,b,I,C,T,_=0;const E=[],O=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,g=(0,u.Vp)(i),S=i.isWebMercator,I=S?102100:4326,A=l.j7[I].maxX,b=l.j7[I].minX,C=l.j7[I].plus180Line,T=l.j7[I].minus180Line),g)if("mesh"===t.type)O.push(t);else if("point"===t.type)O.push(w(t.clone(),A,b));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>w(e,A,b))),O.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);O.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,n=(0,l.kd)(e.xmin,b)*(2*A);let s=0===n?t.clone():(0,l.kS)(t.clone(),n);e.offset(n,0);let{xmin:r,xmax:i}=e;r=Number(r.toFixed(9)),i=Number(i.toFixed(9)),e.intersects(C)&&i!==A?(_=i>_?i:_,s=x(s,S),E.push(s),O.push("cut")):e.intersects(T)&&r!==b?(_=i*(2*A)>_?i*(2*A):_,s=x(s,S,360),E.push(s),O.push("cut")):O.push(s)}else O.push(t.clone());else O.push(t);else O.push(t);let R=(0,l.kd)(_,A),v=-90;const q=R,k=new a.A;for(;R>0;){const e=360*R-180;k.addPath([[e,v],[e,-1*v]]),v*=-1,R--}if(E.length>0&&q>0){const t=F(E,await async function(e,t,n,s){const r=(0,f.Dl)(e),i=t[0].spatialReference,o={...s,responseType:"json",query:{...r.query,f:"json",sr:(0,u.YX)(i),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},a=await(0,c.A)(r.path+"/cut",o),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=i,t}))}}(r,E,k,n)),s=[],i=[];for(let n=0;n<O.length;n++){const r=O[n];if("cut"!==r)i.push(r);else{const r=t.shift(),o=e[n];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&r.rings.length>=o.rings.length?(s.push(r),i.push("simplify")):i.push(S?(0,p.Gh)(r):r)}}if(!s.length)return i;const o=await async function(e,t,n){const s="string"==typeof e?(0,h.An)(e):e,r=t[0].spatialReference,i=(0,d.$B)(t[0]),o={...n,query:{...s.query,f:"json",sr:(0,u.YX)(r),geometries:JSON.stringify((0,y.X)(t))}},{data:a}=await(0,c.A)(s.path+"/simplify",o);return(0,y.V)(a.geometries,i,r)}(r,s,n),a=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?a.push(t):a.push(S?(0,p.Gh)(o.shift()):o.shift())}return a}const D=[];for(let e=0;e<O.length;e++){const t=O[e];if("cut"!==t)D.push(t);else{const e=E.shift();D.push(!0===S?(0,p.Gh)(e):e)}}return D}},80754:(e,t,n)=>{n.d(t,{j7:()=>o,kS:()=>l,kd:()=>a,r8:()=>u});var s=n(82799),r=n(16930),i=n(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=u(e);for(const e of n)for(const n of e)n[0]+=t;return e}function u(e){return(0,i.Bi)(e)?e.rings:e.paths}},40752:(e,t,n)=>{n.r(t),n.d(t,{default:()=>W}),n(59456);var s=n(78888),r=n(60999),i=n(67482),o=n(49186),a=n(53966),l=n(74887),u=n(84952),p=n(57251),c=n(7320),d=n(21325),f=n(28735),h=n(43334),y=n(92722),m=n(58376),g=n(83221),S=n(31464),x=n(19730),w=n(14607),F=n(30524);function N(e,t,n){t=(0,F.rS)(t)?.toLowerCase(),n=(0,F.rS)(n)?.toLowerCase();const s=e.map((e=>e.toLowerCase())),r=t?e[s.indexOf(t)]:null,i=n?e[s.indexOf(n)]:null;return{longitudeFieldName:r||e[s.indexOf(b.find((e=>s.includes(e))))],latitudeFieldName:i||e[s.indexOf(A.find((e=>s.includes(e))))]}}const A=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],b=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"],I=/^\s*"([\S\s]*)"\s*$/,C=/""/g,T=[","," ",";","|","\t"];function*_(e,t,n){let s=0;for(;s<=e.length;){const r=e.indexOf(t,s),i=e.slice(s,r>-1?r:void 0);s+=i.length+t.length,n&&!i.trim()||(yield i)}}function E(e){const t=e.includes("\r\n")?"\r\n":"\n";return _(e,t,!0)}function O(e,t){return _(e,t,!1)}function R(e,t,n){e=e.trim(),t=t?.trim();const s=[],r=Array.from(new Set([n?.delimiter,...T])).filter((e=>null!=e));for(const n of r){const r=k(e,n).length,i=k(t,n).length??r;r>1&&s.push({weight:Math.min(r,i),delimiter:n})}const i=s.sort((({weight:e},{weight:t})=>t-e)).map((({delimiter:e})=>e));for(const t of i){const s=N(q(e,t).names,n?.longitudeField,n?.latitudeField);if(s.longitudeFieldName&&s.latitudeFieldName)return{delimiter:t,locationInfo:s}}return{delimiter:i[0],locationInfo:null}}function*v(e,t,n,s=()=>Object.create(null)){const r=E(e);r.next();let i="",o="",a=0,l=s(),u=0;e:for(const e of r){const r=O(e,n);for(const e of r)if(i+=o+e,o="",a+=D(e),a%2==0){if(a>0){const e=I.exec(i);if(!e){l=s(),u=0,i="",a=0;continue e}l[t[u]]=e[1].replaceAll(C,'"'),u++}else l[t[u]]=i,u++;i="",a=0}else o=n;0===a?(yield l,l=s(),u=0):o="\n"}}function q(e,t){const n=k(e,t).filter((e=>null!=e)),s=n.map((e=>(0,F.rS)(e)));for(let e=s.length-1;e>=0;e--)s[e]||(s.splice(e,1),n.splice(e,1));return{names:s,aliases:n}}function k(e,t){if(!e?.length)return[];const n=[];let s="",r="",i=0;const o=O(e,t);for(const e of o)if(s+=r+e,r="",i+=D(e),i%2==0){if(i>0){const e=I.exec(s);e&&n.push(e[1].replaceAll(C,'"'))}else n.push(s);s="",i=0}else r=t;return n}function D(e){let t=0,n=0;for(n=e.indexOf('"',n);n>=0;)t++,n=e.indexOf('"',n+1);return t}function M(e,t,n,s,r){const i=[],o=v(e,n,t),a=[];for(const e of o){if(10===a.length)break;a.push(e)}for(let e=0;e<n.length;e++){const t=n[e],o=s[e];if(t===r.longitudeFieldName||t===r.latitudeFieldName)i.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e;switch(j(a.map((e=>e[t])))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate";break;default:e="esriFieldTypeString"}i.push({name:t,type:e,alias:o,length:(0,F._b)(e)})}}return i}function j(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map((e=>{if(""!==e){if(!t.test(e)){let t=B(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,i.Cq)(e)?"date":"string"}})).reduce(((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0))}const B=function(){const e=(0,w.B)(),t=new RegExp("^"+e.regexp+"$"),n=new RegExp("["+e.group+"\\s\\xa0]","g"),s=e.factor;return r=>{const i=t.exec(r);if(e.factor=s,!i)return NaN;let o=i[1];if(!i[1]){if(!i[2])return NaN;o=i[2],e.factor*=-1}return o=o.replace(n,"").replace(e.decimal,"."),+o*e.factor}}();function L(e){return JSON.parse(JSON.stringify(e))}var z=n(64714),P=n(95466),G=n(56400),Q=n(16930);const U=(0,z.F0)("esriGeometryPoint"),V=["csv"],$=[0,0];class J{constructor(e,t){this.x=e,this.y=t}}class W{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[n]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),s=function(e,t){const n=t.parsingOptions||{},s={delimiter:n.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:n.latitudeField,longitudeFieldName:n.longitudeField}},r=s.layerDefinition={name:(0,u.e7)(t.url,V)||"csv",dateFieldsTimeReference:{timeZoneIANA:G.n$},drawingInfo:U,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:n.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:n.spatialReference||{wkid:4326}}},i=E(e),a=i.next().value?.trim(),l=i.next().value?.trim();if(!a)throw new o.A("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:p,locationInfo:c}=R(a,l,n);if(!p)throw new o.A("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:l,parsingOptions:n});if(!c)throw new o.A("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:l,parsingOptions:n});s.locationInfo=c,s.delimiter=p;const{names:d,aliases:f}=q(a,p),h=M(e,s.delimiter,d,f,s.locationInfo);if(n.fields?.length){const e=new P.A(n.fields);for(const t of h){const n=e.get(t.name);n&&Object.assign(t,n)}}if(!h.some((e=>"esriFieldTypeOID"===e.type&&(r.objectIdField=e.name,!0)))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};r.objectIdField=e.name,h.unshift(e)}r.fields=h;const y=new P.A(r.fields);if(s.locationInfo&&(s.locationInfo.latitudeFieldName=y.get(s.locationInfo.latitudeFieldName).name,s.locationInfo.longitudeFieldName=y.get(s.locationInfo.longitudeFieldName).name),r.timeInfo){const e=r.timeInfo;if(e.startTimeField){const t=y.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=y.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=y.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(r.timeInfo=null)}return s}(n,e);this._locationInfo=s.locationInfo,this._delimiter=s.delimiter,this._queryEngine=this._createQueryEngine(s);const r=await this._createFeatures(n);this._queryEngine.featureStore.addMany(r);const{fullExtent:i,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(s.layerDefinition.extent=i,a){const{start:e,end:t}=a;s.layerDefinition.timeInfo.timeExtent=[e,t]}return s}async applyEdits(){throw new o.A("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),(0,m.J)(this._queryEngine,e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,r.UT)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)}),(e=>{this._queryEngine.featureStore.clear(),(0,l.zf)(e)||a.A.getLogger("esri.layers.CSVLayer").error(new o.A("csv-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:n}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:n}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:n}=this._loadOptions;if(!t)throw new o.A("csv-layer:invalid-source","url not defined");const r=(0,u.An)(t);return(await(0,s.A)(r.path,{query:{...r.query,...n},responseType:"text",signal:e})).data}_createQueryEngine(e){const{objectIdField:t,fields:n,extent:s,timeInfo:r}=e.layerDefinition,i=new g.A({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new x.do({fieldsIndex:P.A.fromLayerJSON({fields:n,dateFieldsTimeReference:{timeZoneIANA:G.n$}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:r,objectIdField:t,spatialReference:s.spatialReference||{wkid:4326},featureStore:i})}async _createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:n}=this._locationInfo,{objectIdField:s,fieldsIndex:r,spatialReference:o}=this._queryEngine;let a=[];const l=[],u=r.fields.filter((e=>e.name!==s)).map((e=>e.name));let m=0;const g={};for(const e of r.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,F.lD)(e);void 0!==t&&(g[e.name]=t)}const S=v(e,u,this._delimiter,(0,z.Vx)(g,s));for(const e of S){const o=this._parseCoordinateValue(e[t]),u=this._parseCoordinateValue(e[n]);if(null!=u&&null!=o&&!isNaN(o)&&!isNaN(u)){e[t]=o,e[n]=u;for(const s in e)if(s!==t&&s!==n)if(r.isDateField(s))e[s]=(0,i._U)(e[s]);else if(r.isNumericField(s)){const t=B(e[s]);isNaN(t)?e[s]=null:e[s]=t}else null!=e[s]&&(e[s]=L(e[s]));e[s]=m,m++,a.push(new J(u,o)),l.push(e)}}if(!(0,d.aI)({wkid:4326},o))if((0,d.K8)(o))for(const e of a)[e.x,e.y]=(0,f.je)(e.x,e.y,$);else a=(0,p.projectMany)(c.g,a,Q.A.WGS84,o,null,null);const x=[];for(let e=0;e<a.length;e++){const{x:t,y:n}=a[e],r=l[e];r[s]=e+1,x.push(new h.Om(new y.A([],[t,n]),r,null,r[s]))}return x}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=B(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,S.Nk)(d.KK,e)}catch{throw new o.A("csv-layer:projection-not-supported","Projection not supported")}}}},64714:(e,t,n)=>{n.d(t,{F0:()=>l,Vx:()=>c,e2:()=>f,f:()=>h});var s=n(44208),r=n(4718),i=n(99352),o=n(4071),a=n(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function c(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this${d(t)} = null;`;for(const t in e)n+=`this${d(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new s}catch(n){return()=>({[t]:null,...e})}}function d(e){return u.test(e)?`.${e}`:`["${e}"]`}function f(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function h(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},4071:(e,t,n)=>{n.d(t,{$:()=>s,P:()=>r});const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},r={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},92300:(e,t,n)=>{n.d(t,{V:()=>i,X:()=>r});var s=n(65864);function r(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function i(e,t,n){const r=(0,s.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=n,t}))}},2272:(e,t,n)=>{n.d(t,{Dl:()=>o,jV:()=>i,lF:()=>a}),n(92602),n(70333);var s=n(4718),r=n(84952);function i(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,r.An)(e):(0,s.o8)(e)}function a(e,t,n){const s={};for(const r in e){if("declaredClass"===r)continue;const i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i))s[r]=i.map((e=>a(e)));else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(n?.[r]);s[r]=t?e:JSON.stringify(e)}else s[r]=t?i:JSON.stringify(i);else s[r]=i}return s}n(926)},93470:(e,t,n)=>{n.d(t,{Cb:()=>i,HW:()=>p,JR:()=>r,JZ:()=>l,WR:()=>a,b6:()=>c,fT:()=>s,nC:()=>u,yM:()=>o});const s=[252,146,31,255],r=[153,153,153,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},a={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},u={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},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[844,7159,8256,8463],{97159:(e,t,r)=>{r.d(t,{M:()=>m,a:()=>g,b:()=>b,e:()=>f,f:()=>o,i:()=>d,p:()=>p,r:()=>l,t:()=>a,w:()=>u});var i=r(70333),s=r(84952),n=r(39131);function o(e,t){const r=t?.url?.path;if(e&&r&&(e=(0,s.s2)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,s.V1)(e,t.portalItem.itemUrl);null!=r&&h.test(r)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return(e=y(e,t?.portal))&&c.test(e)?g(e):e}function a(e,t,r=m.YES){if(null==(e=e&&c.test(e)?_(e):e))return e;!(0,s.oP)(e)&&t?.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let i=(0,s.s2)(e);if(t){const r=t.verifyItemRelativeUrls?.rootPath||t.url?.path;if(r){const n=y(r,t.portal),o=y(i,t.portal);i=(0,s.V1)(o,n,n),null!=i&&i!==o&&i!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(i)}}return i=f(i,t?.portal),(0,s.oP)(i)&&(i=(0,s.S8)(i)),t?.resources&&t?.portalItem&&!(0,s.oP)(i)&&!(0,s.DB)(i)&&r===m.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(i),compress:!1}),i}function l(e,t,r){return o(e,r)}function u(e,t,r,i){const s=a(e,i);void 0!==s&&(t[r]=s)}const c=/\/items\/([^/]+)\/resources\/(.*)/,h=/^\.\/resources\//;function d(e){const t=e?.match(c)??null;return t?.[1]??null}function p(e){const t=e?.match(c)??null;if(null==t)return null;const r=t[2],i=r.lastIndexOf("/");if(-1===i){const{path:e,extension:t}=(0,s.xw)(r);return{prefix:null,filename:e,extension:t}}const{path:n,extension:o}=(0,s.xw)(r.slice(i+1));return{prefix:r.slice(0,i),filename:n,extension:o}}function f(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,s.T1)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function y(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,i=(0,s.Xq)();return(0,s.FX)(i,`${i.scheme}://${r}`)?(0,s.T1)(e,t.portalHostname,r):(0,s.T1)(e,r,t.portalHostname)}function g(e){if(!e)return e||null;let t=e;return t&&i.id&&!i.id.findCredential(t)&&(t=(0,n.qG)(t),t=t.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),t=t.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),t=t.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),t}function _(e){if(!e)return e||null;let t=e;return t=t.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),t=t.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),t=t.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),t&&i.id&&!i.id.findCredential(t)&&(t=(0,n.qG)(t)),t}var m,v;(v=m||(m={}))[v.YES=0]="YES",v[v.NO=1]="NO";const b=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return m},ensureMainOnlineDomain:f,fromCDNUrl:_,fromJSON:o,itemIdFromResourceUrl:d,prefixAndFilenameFromResourceUrl:p,read:l,toCDNUrl:g,toJSON:a,write:u},Symbol.toStringTag,{value:"Module"}))},4902:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),s=r(40608);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};var u;l=(0,i._)([(0,s.$)("esri.core.Identifiable")],l),(u=l||(l={})).IdentifiableMixin=o,u.NumericIdentifiableMixin=a;const c=l},66344:(e,t,r)=>{r.d(t,{q:()=>l});var i,s,n=r(3694);(s=i||(i={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class o{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n.A,this._users=new n.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear()}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const r=this._db.get(e.id+t);return r?.size??0}put(e,t,r,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!==r&&this._notifyRemove(t,o.entry,o.size,i.ALL)),s>this._maxSize)return void this._notifyRemove(t,r,s,i.ALL);if(void 0===r)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,r,0,i.ALL);const l=1+Math.max(n,-4)- -3;this._db.set(t,new a(r,s,l)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t,r,s){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===r){for(this._size-=n.size,e.size-=n.size;s>this._maxSize;){const e=this._notifyRemove(t,r,s,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}n.size=s,this._size+=s,e.size+=s,this._checkSize()}}pop(e,t){t=e.id+t;const r=this._db.get(t);if(r)return this._size-=r.size,e.size-=r.size,this._db.delete(t),++this._hit,r.entry;++this._miss}get(e,t){t=e.id+t;const r=this._db.get(t);if(void 0!==r)return this._db.delete(t),r.lives=r.lifetime,this._db.set(t,r),++this._hit,r.entry;++this._miss}peek(e,t){const r=this._db.get(e.id+t);return r?++this._hit:++this._miss,r?.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={},r=new Array;this._db.forEach(((e,i)=>{const s=e.lifetime;r[s]=(r[s]||0)+e.size,this._users.forAll((r=>{const{id:s,name:n}=r;if(i.startsWith(s)){const r=t[n]||0;t[n]=r+e.size}}))}));const i={};this._users.forAll((e=>{const r=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[r]||0;t[r]=s,i[r]=Math.round(100*e.hitRate)+"%"}else i[r]="0%"}));const s=Object.keys(t);s.sort(((e,r)=>t[r]-t[e])),s.forEach((r=>e[r]=Math.round(t[r]/2**20)+"MB / "+i[r]));for(let t=r.length-1;t>=0;--t){const i=r[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,r)=>{r.startsWith(t)&&(this._size-=e.size,this._db.delete(r),this._notifyRemove(r,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r,i){let s;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,i,r);return"number"==typeof e&&(s=e),!0}return!1})),s}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const r=e?.id;let i=!0;for(;i;){i=!1;for(const[s,n]of this._db)if(0===n.lifetime&&(!r||s.startsWith(r))){if(this._purgeItem(s,n,e),t.size<=.9*t.maxSize)return;i||=this._db.has(s)}}for(const[i,s]of this._db)if((!r||i.startsWith(r))&&(this._purgeItem(i,s,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,r=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,r&&(r.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=s&&s>0&&(this._size+=s,r&&(r.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class a{constructor(e,t,r){this.entry=e,this.size=t,this.lifetime=r,this.lives=r}}class l{constructor(e,t){this._storage=new o,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,r=1){this._storage.put(this,e,t,r,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(){}}},92071:(e,t,r)=>{r.d(t,{P:()=>v,L:()=>b});var i=r(90237),s=r(69622),n=r(76953),o=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,o.o8)(e),a.Gr.DEFAULTS)}));for(let r=a.Gr.SERVICE;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,s)=>{e&&e.has(s)||t.set(s,(0,o.o8)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=a.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var u=r(45917),c=r(88620),h=r(40608);const d=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,c.oY)(this),r=t.store,i=new l;t.store=i,(0,n.k)(t,r,i)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const r=p(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach((e=>{s[e]=r.get(e,i)})),s}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return p(this).originOf(e)}revert(e,t){const r=p(this),i=(0,a.aB)(t),s=(0,c.oY)(this);let n;n="string"==typeof e?"*"===e?r.keys(i):[e]:e,n.forEach((e=>{s.invalidate(e),r.revert(e,i),s.commit(e)}))}};return t=(0,i._)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function p(e){return(0,c.oY)(e).store}let f=class extends(d(s.A)){};f=(0,i._)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],f);var y=r(16649),g=r(49422);const _=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return m(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,g.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,c.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=m(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),a.Gr.USER)}updateOrigin(e,t){const r=m(this),i=(0,a.aB)(t),s=(0,y.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,h.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function m(e){return(0,c.oY)(e).store}const v=e=>{let t=class extends(_(d(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,h.$)("esri.core.MultiOriginJSONSupport")],t),t};let b=class extends(v(s.A)){};b=(0,i._)([(0,h.$)("esri.core.MultiOriginJSONSupport")],b)},60999:(e,t,r)=>{r.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>c,UT:()=>y,jJ:()=>u});var i=r(90237),s=r(69622),n=r(97768),o=r(74887),a=r(10107),l=r(40608);function u(e,t,r){return(0,o.Lx)(e.map(((e,i)=>t.apply(r,[e,i]))))}async function c(e,t,r){return(await(0,o.Lx)(e.map(((e,i)=>t.apply(r,[e,i]))))).map((e=>e.value))}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function f(e){try{return h(await e)}catch(e){return(0,o.QP)(e),d(e)}}function y(e,t){return new g(e,t)}let g=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then((e=>{this._result=h(e),this._cleanup()}),(e=>{this._result=d(e),this._cleanup()})),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,i._)([(0,a.MZ)()],g.prototype,"value",null),(0,i._)([(0,a.MZ)()],g.prototype,"error",null),(0,i._)([(0,a.MZ)()],g.prototype,"finished",null),(0,i._)([(0,a.MZ)()],g.prototype,"promise",void 0),(0,i._)([(0,a.MZ)()],g.prototype,"_result",void 0),g=(0,i._)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],g)},36708:(e,t,r)=>{r.d(t,{C_:()=>d,OH:()=>y,Vh:()=>g,on:()=>h,pc:()=>_,wB:()=>l,z7:()=>u}),r(60999),r(5503);var i=r(37955),s=r(36563),n=r(97768),o=r(74887),a=r(14012);function l(e,t,r={}){return c(e,t,r,p)}function u(e,t,r={}){return c(e,t,r,f)}function c(e,t,r={},i){let s=null;const o=r.once?(e,r)=>{i(e)&&((0,n.xt)(s),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(s=(0,a.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return s}function h(e,t,r,o={}){let a=null,u=null,c=null;function h(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,n.xt)(c),r(e)}const p=l(e,((e,r)=>{h(),(0,i.wb)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return c=(0,s.hA)((()=>{p.remove(),h()})),c}function d(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,n.xt)(a)}return new Promise(((i,n)=>{a=(0,s.vE)([(0,o.u7)(r,(()=>{l(),n((0,o.NK)())})),c(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}r(80559);const y={sync:!0},g={initial:!0},_={sync:!0,initial:!0}},35982:(e,t,r)=>{r.d(t,{B:()=>l});var i=r(4576),s=r(36563),n=r(53966),o=r(74887),a=r(29953);class l{constructor(e,t,r,i,s={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._promise=(0,a.ho)(e,{...s,schedule:i}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>n.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,s.hA)((()=>{r.removed=!0,(0,i.TF)(this._listeners,r),this._thread&&null!=r.threadHandle&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const i=this._transferLists[e],s=i?i(t):[];return this._thread.invoke(e,t,{transferList:s,signal:r})}return this._promise?this._promise.then((()=>((0,o.Te)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}},54239:(e,t,r)=>{r.d(t,{A:()=>v});var i,s=r(90237),n=r(4576),o=r(66552),a=r(25482),l=r(83047),u=r(67076),c=r(10107),h=(r(44208),r(53966),r(36005)),d=r(40608),p=r(43937);const f=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),y=f.jsonValues.slice();(0,n.Xy)(y,"orthometric");const g=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let _=i=class extends a.A{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return f.write(e,t,r)}readHeightModel(e,t,r){return f.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(m(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||g.read(e)||(r?.messages&&r.messages.push(m(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.k1)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function m(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,c.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y,default:"ellipsoidal",write:{isRequired:!0}}}}})],_.prototype,"heightModel",void 0),(0,s._)([(0,p.K)("web-scene","heightModel")],_.prototype,"writeHeightModel",null),(0,s._)([(0,h.w)(["web-scene","service"],"heightModel")],_.prototype,"readHeightModel",null),(0,s._)([(0,c.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:{writer:g.write,isRequired:!0}}}}})],_.prototype,"heightUnit",void 0),(0,s._)([(0,h.w)("web-scene","heightUnit")],_.prototype,"readHeightUnit",null),(0,s._)([(0,h.w)("service","heightUnit")],_.prototype,"readHeightUnitService",null),(0,s._)([(0,c.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],_.prototype,"vertCRS",void 0),(0,s._)([(0,h.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],_.prototype,"readVertCRS",null),_=i=(0,s._)([(0,d.$)("esri.geometry.HeightModelInfo")],_);const v=_},68611:(e,t,r)=>{r.r(t),r.d(t,{default:()=>E});var i=r(90237),s=r(78888),n=r(49186),o=r(97768),a=r(92071),l=r(74887),u=r(84952),c=r(10107),h=(r(44208),r(53966),r(87811),r(36005)),d=r(40608),p=r(54239),f=r(4146),y=r(89186),g=r(18768),_=r(16131),m=r(8303),v=r(10873);class b{constructor(e,t,r,i){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=r,this.noDataValue=i)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get cachedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let r=1/0,i=-1/0,s=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(r=n<r?n:r,i=n>i?n:i,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=r,this._maxValue=i>-3e38?i:0)}}var w=r(35982);class S extends w.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,r){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},r):Promise.resolve(null)}release(){--this.ref<=0&&(M.forEach(((e,t)=>{e===this&&M.delete(t)})),this.destroy())}}const M=new Map;let I=class extends((0,y.f)((0,g.b)((0,_.q)((0,m.A)((0,a.P)(f.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=M.get(e);return t||(null!=e?(t=new S((t=>e.immediate.schedule(t))),M.set(e,t)):(t=new S,M.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));return r?{operations:{supportsTileMap:r.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let r=t.currentVersion;return r||(r=9.3),r}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.QP).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,r,i){const n=null!=(i=i||{signal:null}).signal?i.signal:i.signal=(new AbortController).signal,o={responseType:"array-buffer",signal:n},a={noDataValue:i.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,r,i))).then((()=>(0,s.A)(this.getTileUrl(e,t,r),o))).then((e=>this._lercDecoder.decode(e.data,a,n))).then((e=>new b(e)))}getTileUrl(e,t,r){const i=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,u.x0)({...this.parsedUrl.query,blankTile:!i&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${r}${s?"?"+s:""}`}async queryElevation(e,t){const{ElevationQuery:i}=await r.e(3492).then(r.bind(r,63492));return(0,l.Te)(t),(new i).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:i}=await r.e(3492).then(r.bind(r,63492));return(0,l.Te)(t),(new i).createSampler(this,e,t)}_fetchTileAvailability(e,t,r,i){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,r,i):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},r=await(0,s.A)(this.parsedUrl.path,t);r.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=r.data,this.read(r.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[A]}};(0,i._)([(0,c.MZ)({readOnly:!0})],I.prototype,"capabilities",void 0),(0,i._)([(0,h.w)("service","capabilities",["capabilities"])],I.prototype,"readCapabilities",null),(0,i._)([(0,c.MZ)({json:{read:{source:"copyrightText"}}})],I.prototype,"copyright",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,type:p.A})],I.prototype,"heightModelInfo",void 0),(0,i._)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],I.prototype,"path",void 0),(0,i._)([(0,c.MZ)({type:["show","hide"]})],I.prototype,"listMode",void 0),(0,i._)([(0,c.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],I.prototype,"minScale",void 0),(0,i._)([(0,c.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],I.prototype,"maxScale",void 0),(0,i._)([(0,c.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],I.prototype,"opacity",void 0),(0,i._)([(0,c.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],I.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.MZ)()],I.prototype,"sourceJSON",void 0),(0,i._)([(0,c.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],I.prototype,"type",void 0),(0,i._)([(0,c.MZ)(v.OZ)],I.prototype,"url",void 0),(0,i._)([(0,c.MZ)()],I.prototype,"version",void 0),(0,i._)([(0,h.w)("version",["currentVersion"])],I.prototype,"readVersion",null),I=(0,i._)([(0,d.$)("esri.layers.ElevationLayer")],I);const A=Symbol("default-fetch-tile");I.prototype.fetchTile[A]=!0;const E=I},4146:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(90237),s=(r(59456),r(78888)),n=r(49186),o=r(65529),a=r(4902),l=r(92474),u=r(53966),c=r(74887),h=r(84952),d=r(10107),p=(r(44208),r(87811),r(40608)),f=r(92602),y=r(79677),g=r(5443),_=r(16930);let m=0,v=class extends(o.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new g.A(-180,-90,180,90,_.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+m++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=_.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",s=r?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,h.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,i._)([(0,d.MZ)({type:g.A})],v.prototype,"fullExtent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i._)([(0,d.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i._)([(0,d.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i._)([(0,d.MZ)({type:_.A})],v.prototype,"spatialReference",void 0),(0,i._)([(0,d.MZ)({type:String})],v.prototype,"title",void 0),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i._)([(0,d.MZ)()],v.prototype,"url",void 0),(0,i._)([(0,d.MZ)({type:y.A})],v.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i._)([(0,p.$)("esri.layers.Layer")],v);const b=v},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(90237),s=r(53966),n=r(10107),o=(r(44208),r(87811),r(40608)),a=r(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,i._)([(0,n.MZ)()],t.prototype,"title",null),(0,i._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>S});var i=r(90237),s=r(92602),n=r(70333),o=r(78888),a=r(60999),l=r(49186),u=r(53966),c=r(97768),h=r(74887),d=r(84952),p=r(10107),f=(r(44208),r(87811),r(36005)),y=r(40608),g=r(43937),_=r(83531),m=r(20655),v=r(80812),b=r(41318),w=r(10407);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,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,h.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,h.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,h.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!n.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,a;if(s)o=r.portal.url;else try{o=await(0,_.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!o||!(0,d.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const l=!0,u=!1,c=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:c}};try{if(s?await r.reload():(r=new v.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,h.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(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 r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=m.A.getDefault();if(s&&s.loaded&&(0,d.S8)(s.restUrl)===(0,d.S8)(i))return s.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?b.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||m.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,p.MZ)({type:v.default})],t.prototype,"portalItem",null),(0,i._)([(0,f.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,p.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,y.$)("esri.layers.mixins.PortalLayer")],t),t},M={credential:null,user:null}},60694:(e,t,r)=>{r.d(t,{Fi:()=>c,HZ:()=>_,Jf:()=>g,LS:()=>m,Wo:()=>y,bd:()=>v,cr:()=>p,iz:()=>d,qg:()=>h,yG:()=>f});var i=r(84952),s=r(97159);const n={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",knowledgegraphserver:"KnowledgeGraphServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer",videoserver:"VideoServer"},o=Object.values(n),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function c(e){return a.test(e)}function h(e){if(null==e)return null;const t=(0,i.An)(e),r=t?.path.match(a)||t?.path.match(l);if(!r)return null;const[,s,o,u,c]=r,h=o.indexOf("/");return{title:p(-1!==h?o.slice(h+1):o),serverType:n[u.toLowerCase()],sublayer:null!=c&&""!==c?parseInt(c,10):null,url:{path:s}}}function d(e){const t=(0,i.An)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function p(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function f(e,t){const r=[];if(e){const t=h(e);null!=t&&t.title&&r.push(t.title)}if(t){const e=p(t);r.push(e)}if(2===r.length){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function y(e){let t=(0,i.$z)(e,!0);return!!t&&(t=t.toLowerCase(),t.endsWith(".arcgis.com")&&(t.startsWith("services")||t.startsWith("tiles")||t.startsWith("features")))}function g(e,t){return e?(0,i.UC)((0,i.zi)(e,t)):e}function _(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.zi)(t,e.logger);const r=(0,i.An)(t),s=h(r.path);let n;if(null!=s)null!=s.sublayer&&null==e.layer.layerId&&(n=s.sublayer),t=s.url.path;else if(e.nonStandardUrlAllowed){const e=d(r.path);null!=e&&(t=e.serviceUrl,n=e.sublayerId)}return{url:(0,i.UC)(t),layerId:n}}function m(e,t,r,n,o){(0,s.w)(t,n,"url",o),n.url&&null!=e.layerId&&(n.url=(0,i.fj)(n.url,r,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),r=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),s=t.includes("/imageserver/wmsserver"),n=t.includes("/wmsserver");return r&&(i||s||n)}},83531:(e,t,r)=>{r.d(t,{BR:()=>c,Ov:()=>a,TU:()=>o,W_:()=>l,XX:()=>n,tk:()=>h,wI:()=>u});var i=r(70333),s=r(78888);const n={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function u(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const n=e.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const o=`${e.slice(0,n)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,s.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function h(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}},10407:(e,t,r)=>{r.d(t,{It:()=>p,LG:()=>o,OM:()=>u,Sm:()=>c,Y:()=>a,bK:()=>l,mm:()=>d,sQ:()=>h});var i=r(57251),s=r(16930),n=r(28735);function o(e,t){if(!a(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,d.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function c(e,t,r){r?o(e,t):u(e,t)}async function h(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);const r=s.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(r)}const d={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table",HOSTED_SERVICE:"Hosted Service",LOCAL_SCENE:"ViewingMode-Local",TILED_IMAGERY:"Tiled Imagery",GROUP_LAYER_MAP:"Map",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer"};function p(e){const{portal:t,isOrgItem:r,itemControl:i}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),o=!!r&&!!s?.includes("features:user:fullEdit");const a="update"===i||"admin"===i;return a?o=n=!0:o&&(n=!0),{features:{edit:n,fullEdit:o},content:{updateItem:a}}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5404],{95404:(e,i,r)=>{r.d(i,{computeObjectLayerResourceSize:()=>l}),r(78888);var t=r(49186),o=r(66344),s=r(51850),n=r(70328),u=r(8887);let c=new o.q(50);async function l(e,i=null){if(!e.isPrimitive){const i=e.resource?.href;if(!i)throw new t.A("symbol:invalid-resource","The symbol does not have a valid resource");const o=c.get(i);if(void 0!==o)return o;const{fetch:u}=await Promise.all([r.e(9953),r.e(690),r.e(3030),r.e(2944),r.e(9899),r.e(2626),r.e(2728),r.e(4948)]).then(r.bind(r,64304)),l=await u(i,{disableTextures:!0,spherical:!0,doublePrecisionRequiresObfuscation:!0}),a=(0,n.Ej)(l.referenceBoundingBox,(0,s.vt)());return c.put(i,a),a}if(!e.resource?.primitive)throw new t.A("symbol:invalid-resource","The symbol does not have a valid resource");const o=(0,n.vt)((0,u.Fq)(e.resource.primitive));if(null!=i)for(let e=0;e<o.length;e++)o[e]*=i;return(0,n.Ej)(o,(0,s.vt)())}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[830],{30830:(e,t,n)=>{n.r(t),n.d(t,{fromGeometries:()=>de,fromGeometry:()=>ce,fromGeometryToGXGeometry:()=>he,getSpatialReference:()=>me,toGeometry:()=>_e});var r=n(55537),i=n(11878),a=n(26986),s=n(35368),o=n(83047),u=n(21325);function m(e){return{m_iteratorType:"object",m_o:e,m_keys:Object.keys(e).filter((t=>void 0!==e[t])),m_i:-1,m_bReturnKey:!0,next:l}}function l(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:1,m_value:null},done:!1};if(this.m_i<this.m_keys.length){const e=this.m_bReturnKey,t=Math.trunc(this.m_i);return this.m_bReturnKey=!this.m_bReturnKey,this.m_i+=.5,e?{value:{m_token:5,m_value:this.m_keys[t]},done:!1}:{value:{m_token:6,m_value:this.m_o[this.m_keys[t]]},done:!1}}return{value:{m_token:3,m_value:null},done:!0}}function d(e){return{m_iteratorType:"array",m_i:-1,m_a:e,next:c}}function c(){return-1===this.m_i?(this.m_i=0,{value:{m_token:2,m_value:null},done:!1}):this.m_i<this.m_a.length?{value:{m_token:6,m_value:this.m_a[this.m_i++]},done:!1}:{value:{m_token:4,m_value:null},done:!0}}(0,a.i)((e=>{let t,n;"number"==typeof e?t=e:n=e;const r={wkid:t,wkt:n};let i,a;if(n){i=(0,o.x1)(n);const e=(0,u.EA)(r);if(!i&&!e)throw new Error(`Unsupported WKT type: ${n}`)}else i=!(0,u.EA)(r);return a=t&&o.yD.has(t)?Math.PI/200:i?(0,o.Ao)(r):Math.PI/180,{isPCS:i,metersOrRadiansPerUnit:a,semiMajor:0,wkidOrWkt:e}}));class h{constructor(e){this.m_currentToken=0;const t=e;this.m_iteratorStack=[t instanceof Array?d(t):m(t)],this.m_nextFlatToken={m_value:null,m_token:0}}nextToken(){if(0===this.m_iteratorStack.length)return this.m_currentToken=0;switch(this.m_nextFlatToken=this.m_iteratorStack.at(-1).next().value,this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_currentToken=1;case 3:return this.m_iteratorStack.pop(),this.m_currentToken=3;case 2:return this.m_currentToken=2;case 4:return this.m_iteratorStack.pop(),this.m_currentToken=4;case 5:return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=5;case 6:if(this.m_nextFlatToken.m_value instanceof Array)return this.m_iteratorStack.push(d(this.m_nextFlatToken.m_value)),this.nextToken();if(this.m_nextFlatToken.m_value instanceof Object)return this.m_iteratorStack.push(m(this.m_nextFlatToken.m_value)),this.nextToken();if("number"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,Number.isSafeInteger(this.m_currentValue)&&this.m_currentValue>=(0,i.L)()&&this.m_currentValue<=(0,i.o)()?this.m_currentToken=8:this.m_currentToken=7;if("string"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=6;if("boolean"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=this.m_nextFlatToken.m_value?11:12;if("object"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=null,this.m_currentToken=10;(0,r.a)("unrecognized json element type")}return(0,r.a)("unrecognized json element type"),0}currentToken(){return this.m_currentToken}skipChildren(){if(0!==this.m_iteratorStack.length)switch(this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=3,void(this.m_currentToken=3);case 2:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=4,void(this.m_currentToken=4)}}currentString(){return 6!==this.m_currentToken&&5!==this.m_currentToken&&(0,r.t)("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&(0,r.t)("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&(0,r.t)("invalid token"),this.m_currentValue}currentInt64Value(){return(0,r.g)(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&(0,r.t)("invalid token"),this.m_currentValue}isError(){return 0}}class _{constructor(e){return this.m_buffer=null,this.m_view=null,this.m_sz=0,this.m_offset=0,this.m_bOwnsBuffer=!0,this.m_bLittleEndian=!0,this.m_element=new ArrayBuffer(8),this.m_elementBytes=new Uint8Array(this.m_element),this.m_elementView=new DataView(this.m_element),this.m_elementDouble=new Float64Array(this.m_element),this.m_elementFloat=new Float32Array(this.m_element),this.m_elementInt64=new BigInt64Array(this.m_element),this.m_elementInt32=new Int32Array(this.m_element),this.m_elementInt16=new Int16Array(this.m_element),void 0!==e.sz?(this.m_sz=e.sz,e.buffer?(this.m_sz<0&&(0,r.w)("size out of range"),this.m_buffer=e.buffer,this.m_offset=void 0!==e.offset?e.offset:0,this.m_view=void 0!==e.offset?new DataView(e.buffer,e.offset,e.sz):new DataView(this.m_buffer),this.m_bOwnsBuffer=!1,void(this.m_bLittleEndian=!0)):(this.m_sz<0&&(0,r.w)("size out of range"),void(this.m_sz>0&&(this.m_buffer=new ArrayBuffer(this.m_sz),this.m_view=new DataView(this.m_buffer))))):e.move?(this.m_sz=e.move.m_sz,this.m_buffer=e.move.m_buffer,this.m_view=e.move.m_view,this.m_bOwnsBuffer=e.move.m_bOwnsBuffer,this.m_bLittleEndian=e.move.m_bLittleEndian,e.move.m_buffer=null,e.move.m_view=null,e.move.m_sz=0,void(e.move.m_bOwnsBuffer=!0)):void(0,r.a)("unrecognized constructor options")}swapBytesDouble(){this.doSwap()&&(this.m_elementDouble[0]=this.m_elementBytes[0]<<56|this.m_elementBytes[1]<<48|this.m_elementBytes[2]<<40|this.m_elementBytes[3]<<32|this.m_elementBytes[4]<<24|this.m_elementBytes[5]<<16|this.m_elementBytes[6]<<8|this.m_elementBytes[7])}swapBytesInt32(){this.doSwap()&&(this.m_elementInt32[0]=this.m_elementBytes[0]<<24|this.m_elementBytes[1]<<16|this.m_elementBytes[2]<<8|this.m_elementBytes[3])}getOffset(){return this.m_offset}assignMove(e){return this===e||(this.clear(),this.m_sz=e.m_sz,this.m_buffer=e.m_buffer,this.m_view=e.m_view,this.m_bOwnsBuffer=e.m_bOwnsBuffer,this.m_bLittleEndian=e.m_bLittleEndian,e.m_buffer=null,e.m_sz=0,e.m_bOwnsBuffer=!0),this}doSwap(){return this.m_bLittleEndian!==(1===_.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===_.getNativeByteOrder()}setOrder(e){this.m_bLittleEndian=1===e}getOrder(){return this.m_bLittleEndian?1:0}getView(){return this.m_view||(0,r.u)("buffer not defined"),this.m_view}static getNativeByteOrder(){return 1}clear(){this.m_buffer=null,this.m_sz=0,this.m_bOwnsBuffer=!0}size(){return this.m_sz}readDouble(e){return this.doSwap()?(this.m_elementDouble[0]=this.m_view.getFloat64(e,this.m_bLittleEndian),this.swapBytesDouble(),this.m_elementDouble[0]):this.m_view.getFloat64(e,this.m_bLittleEndian)}writeDouble(e,t){this.m_elementDouble[0]=t,this.swapBytesDouble(),this.m_view.setFloat64(e,this.m_elementDouble[0],this.m_bLittleEndian)}readInt32(e){return this.doSwap()?(this.m_elementInt32[0]=this.m_view.getInt32(e,this.m_bLittleEndian),this.swapBytesInt32(),this.m_elementInt32[0]):this.m_view.getInt32(e,this.m_bLittleEndian)}writeInt32(e,t){this.m_elementInt32[0]=t,this.swapBytesInt32(),this.m_view.setInt32(e,this.m_elementInt32[0],this.m_bLittleEndian)}getPtr(){return this.m_buffer}setSizeNoRealloc(e){(0,r.g)(e>=0&&e<=this.m_sz),this.m_sz=e}}function f(e){let t=!1;for(;3!==e.nextToken();){const n=e.currentString();e.nextToken(),"uwkid"===n?t||(t=!0,8===e.currentToken()&&e.currentInt32Value()):e.skipChildren()}return null}function p(e){let t=!1,n=!1,r=!1,i=!1,s=!1,o=!1,u=!1,m=!1,l=!1,d=!1,c=!1,h=!1,_=!1,p=!1,k=!1,b=!1,g=!1,y=-1,T=-1,N=-1,v=-1,x=0,A=0,S=0,w=0,C=0,D=0,F=0,j=0,z=0,I=0,E="",O="",G=null;for(;3!==e.nextToken();){const a=e.currentString();e.nextToken(),"wkid"===a?t||(t=!0,8===e.currentToken()&&(y=e.currentInt32Value())):"latestWkid"===a?n||(n=!0,8===e.currentToken()&&(T=e.currentInt32Value())):"wkt"===a?s||(s=!0,6===e.currentToken()&&(E=e.currentString())):"wkt2"===a?s||6===e.currentToken()&&(O=e.currentString()):"vcsWkid"===a?r||(r=!0,8===e.currentToken()&&(N=e.currentInt32Value())):"latestVcsWkid"===a?i||(i=!0,8===e.currentToken()&&(v=e.currentInt32Value())):"xyTolerance"===a?u||(u=!0,o=!0,x=e.currentDoubleValue()):"zTolerance"===a?m||(m=!0,o=!0,A=e.currentDoubleValue()):"mTolerance"===a?l||(l=!0,o=!0,S=e.currentDoubleValue()):"falseX"===a?d||(d=!0,o=!0,F=e.currentDoubleValue()):"falseY"===a?c||(c=!0,o=!0,j=e.currentDoubleValue()):"falseZ"===a?h||(h=!0,o=!0,z=e.currentDoubleValue()):"falseM"===a?_||(_=!0,o=!0,I=e.currentDoubleValue()):"xyUnits"===a?p||(p=!0,o=!0,w=e.currentDoubleValue()):"zUnits"===a?k||(k=!0,o=!0,C=e.currentDoubleValue()):"mUnits"===a?b||(b=!0,o=!0,D=e.currentDoubleValue()):"unit"===a?g||(g=!0,G=f(e)):e.skipChildren()}v<=0&&N>0&&(v=N),N<=0&&v>0&&(N=v);let P=null,B=!0;if(0!==E.length&&(B=!1,(0,a.a3)(E)&&(P=(0,a.a)(E))),P||0===O.length||(B=!1,(0,a.a3)(O)&&(P=(0,a.a)(O))),!P&&T>0&&(B=!1,(0,a.a4)(T)&&(v<=0||(0,a.a5)())&&(P=(0,a.c)(T,v))),!P&&y>0&&(B=!1,(0,a.a4)(y)&&(N<=0||(0,a.a5)())&&(P=(0,a.c)(y,N))),B&&(P=(0,a.j)(G)),o&&P){const e=new a.S;P.queryPrecisionDescriptorWithoutFalseXY(e),u&&e.setTolerance(0,x),m&&e.setTolerance(1,A),l&&e.setTolerance(2,S),p&&d&&c&&e.setGridParams(F,j,w),k&&h&&e.setZParams(z,C),b&&_&&e.setMParams(I,D),P=(0,a.a6)(P,e)}return P}function k(e,t,n,a){2!==a.currentToken()&&(0,r.t)("failed to parse multipath: array of array of vertices is expected");const o=e?new s.g:new s.h,u=o,m=(0,s.az)(0),l=(0,s.ax)(2,0),d=(0,s.aA)(0);let c=null,h=null,_=null,f=null,p=null,k=0,b=0,g=0;const T=new s.S,A=i.P.getNAN();let S=0,w=0;const C=e?1:0;for(;4!==a.nextToken();){2!==a.currentToken()&&(0,r.t)("failed to parse multipath: ring/path array is expected");let n=2,o=0,D=!0;const F=4;let j=0,z=0;const I=i.P.getNAN(),E=new Array(F),O=new Array(F);let G=!1;for(a.nextToken();4!==a.currentToken();){if(t&&1===a.currentToken())D&&(0,r.t)("failed to parse multipath: starting vertex array is expected"),_||(_=(0,s.aA)(S-1,1),f=(0,s.az)(S-1,-1),p=(0,s.ax)(0)),G=!0,n=1,({segFlag:g,toPointSz:j}=x(T,E,A,a));else{for(G=!1,2!==a.currentToken()&&(0,r.t)("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),j=0;4!==a.nextToken();)j===F&&(0,r.t)("failed to parse multipath: each vertex array has to have at most 4 elements"),E[j++]=y(a);j<2&&(0,r.t)("failed to parse multipath: each vertex array has to have at least 2 elements"),(0,s.aB)(E[0],E[1])||(0,r.t)("failed to parse multipath: x and y must be finite")}a.nextToken();do{if(l.size()===2*S&&l.resize(N(S)),l.writePoint2D(2*S,I.setCoords(E[0],E[1])),c&&c.size()===S&&c.resize(v(S)),j>2?(c||(c=(0,s.ax)(S+1,Number.NaN)),c.write(S,E[2])):c&&c.write(S,Number.NaN),h&&h.size()===S&&h.resize(v(S)),j>3?(h||(h=(0,s.ax)(S+1,Number.NaN)),h.write(S,E[3])):h&&h.write(S,Number.NaN),D)w++,m.add(S),d.add(C),D=!1,z=j,(0,i.D)(O,E,0,0,z);else if(null!==_)if(G){const e=(0,s.aG)(g),t=p.size();p.resize(t+e),_.add(g),f.add(k),T.get().writeInBufferStream(p,k),k+=e,u.incCurveType(g,1),b++}else _.add(1),f.add(-1);S++,o++,A.setCoords(E[0],E[1])}while(o<n&&4===a.currentToken())}0!==o&&(e&&o>n&&j===z&&0===(0,i.N)(E,O,j)?(S--,o--):null!==_&&(_.add(1),f.add(-1)))}return S&&(m.resize(w),d.resize(w),S>0&&(m.add(S),d.add(0)),u.setAttributeStreamRef(0,l),u.setPathFlagsStreamRef(d),u.setPathStreamRef(m),null!==_&&(u.updateCurveCounter(b),u.setSegmentData(f,p,_,k)),u.notifyModifiedFlags(65535)),{geometry:o,as:c,bs:h}}function b(e,t){2!==t.currentToken()&&(0,r.t)("failed to parse multipoint: array of vertices is expected");let n=0;const a=new s.M,o=(0,s.ax)(2,0);let u=0;const m=new Array(4),l=new i.P;let d=null,c=null;for(;4!==t.nextToken();){for(2!==t.currentToken()&&(0,r.t)("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),u=0;4!==t.nextToken();)4===u&&(0,r.t)("failed to parse multipoint: each vertex array has to have at most 4 elements"),m[u++]=y(t);u<2&&(0,r.t)("failed to parse multipoint: each vertex array has to have at least 2 elements"),(0,s.aB)(m[0],m[1])||(0,r.t)("failed to parse multipoint: x and y must be finite"),o.size()===2*n&&o.resize(N(n)),o.writePoint2D(2*n,l.setCoords(m[0],m[1])),d&&d.size()===n&&d.resize(v(n)),u>2?(d||(d=(0,s.ax)(n+1,Number.NaN)),d.write(n,m[2])):d&&d.write(n,Number.NaN),c&&c.size()===n&&c.resize(v(n)),u>3?(c||(c=(0,s.ax)(n+1,Number.NaN)),c.write(n,m[3])):c&&c.write(n,Number.NaN),n++}if(n){const e=a.getImpl();e.setAttributeStreamRef(0,o),e.resizeNoInit(n),e.notifyModifiedFlags(65535)}return{geometry:a,as:d,bs:c}}function g(e,t){2!==t.currentToken()&&(0,r.t)("failed to parse array of IDs: array of array of integers is expected");const n=(0,s.aC)(2,0);let i=0,a=-1;for(;4!==t.nextToken();){const e=i;n.size()===i&&n.resize(v(i)),i++;let s=0;for(-1===a?a=2===t.currentToken()?1:0:1===a&&2!==t.currentToken()&&(0,r.t)("failed to parse array of IDs: array of array of integers is expected"),0===a&&(n.size()===i&&n.resize(v(i)),n.write(i,T(t)),s++,i++);4!==t.nextToken();)n.size()===i&&n.resize(v(i)),n.write(i,T(t)),s++,i++;if(n.write(e,s),0===a)break}return n.resize(i),n}function y(e){const t=e.currentToken();if(10===t||6===t&&"NaN"===e.currentString())return Number.NaN;{const t=e.currentDoubleValue();return Number.isNaN(t)?Number.NaN:t}}function T(e){return e.currentInt32Value()}function N(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function v(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function x(e,t,n,a,o){const u={segFlag:0,toPointSz:0};let m=a.currentToken();m=a.nextToken();const l=a.currentString(),d=l[0];for((1!==l.length||"a"!==d&&"b"!==d&&"c"!==d&&"n"!==d&&"q"!==d)&&(0,r.t)('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),m=a.nextToken(),2!==m&&(0,r.t)("failed to parse curve: start array is expected for curve parameters"),m=a.nextToken(),2!==m&&(0,r.t)("failed to parse curve: start array is expected for to point"),u.toPointSz=0;4!==a.nextToken();)4===u.toPointSz&&(0,r.t)("failed to parse curve: vertex array cannot have more than 4 elements"),t[u.toPointSz++]=y(a);u.toPointSz<2&&(0,r.t)("failed to parse curve: vertex array must have at least 2 elements");const c=i.P.construct(t[0],t[1]),h=i.P.getNAN();let f=-1,p=-1,k=!1,b=Number.NaN,g=Number.NaN,T=Number.NaN;const N=[i.P.getNAN(),i.P.getNAN(),i.P.getNAN()],v=i.P.getNAN();if("a"===d){m=a.nextToken(),2!==m&&(0,r.t)("failed to parse curve: start array is expected for center point"),m=a.nextToken();const e=y(a);m=a.nextToken();const t=y(a);m=a.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for center point"),h.setCoords(e,t),m=a.nextToken(),f=a.currentInt32Value(),m=a.nextToken(),p=a.currentInt32Value(),m=a.nextToken(),4!==m?(k=!1,b=y(a),m=a.nextToken(),g=y(a),m=a.nextToken(),T=y(a),m=a.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for curve parameters")):k=!0,u.segFlag=4}else if("b"===d){for(let e=0;e<2;e++){m=a.nextToken(),2!==m&&(0,r.t)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const t=y(a);m=a.nextToken();const n=y(a);m=a.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for control point"),N[e].setCoords(t,n)}m=a.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=2}else if("n"===d){{m=a.nextToken(),2!==m&&(0,r.t)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const e=y(a);m=a.nextToken();const t=y(a);m=a.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for control point"),N[0].setCoords(e,t)}m=a.nextToken();const e=y(a);m=a.nextToken();const t=y(a);m=a.nextToken();const n=y(a);N[1].setCoords(e,t),N[2].setCoords(n,n),m=a.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=8}else if("q"===d){for(let e=0;e<1;e++){m=a.nextToken(),2!==m&&(0,r.t)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const t=y(a);m=a.nextToken();const n=y(a);m=a.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for control point"),N[e].setCoords(t,n)}m=a.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=16}else{m=a.nextToken(),2!==m&&(0,r.t)("failed to parse curve: start array is expected for interior point"),m=a.nextToken();const e=y(a);m=a.nextToken();const t=y(a);m=a.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for interior point"),v.setCoords(e,t),m=a.nextToken(),4!==m&&(0,r.t)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=4}if(m=a.nextToken(),3!==m&&(0,r.t)("failed to parse curve: end object is expected for curve"),"a"===d)if(e.createEllipticArc(),k){const t=!0;A(e.get(),n,c,h,t,f,p)}else!function(e,t,n,r,i,a,o,u,m){e.dropAllAttributes();const l=new ArrayBuffer(44),d=new _({sz:44,buffer:l});let c=0;d.writeDouble(c,r.x),c+=8,d.writeDouble(c,r.y),c+=8,d.writeDouble(c,o),c+=8,d.writeDouble(c,u),c+=8,d.writeDouble(c,m),c+=8;let h=0;a||(h|=2048),i&&(h|=4096),d.writeInt32(c,h),c+=4,function(e,t,n,r){e.m_bits=0,e.m_center.x=r.readDouble(0),e.m_center.y=r.readDouble(8),e.m_rotation=r.readDouble(16),e.m_semiMajorAxis=r.readDouble(24),e.m_minorMajorRatio=r.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y;const i=r.readInt32(40);if(1&i)return!1;let a=!!(64&i),o=!!(128&i);const u=!!(2048&i),m=!!(4096&i);!(512&i)&&!(1024&i)||o||(a=!0),o&&!t.equals(n)?(o=!1,a=!0):a&&t.equals(n)&&(o=!0,a=!1),o?(e.m_center.assign(t),e.m_startAngle=e.m_center.x,e.m_sweepAngle=e.m_center.y,(0,s.aF)(e,Number.NaN,u,m),e.m_semiMajorAxis=0,e.m_interior.setCoordsPoint2D(t)):a?(e.m_center.setNAN(),e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,s.aD)(e),e.queryCoord2D(.5,e.m_interior)):e.constructEllipticArcEndPointsCenter(t,n,e.m_semiMajorAxis,e.m_minorMajorRatio,e.m_rotation,!m,u,e.m_center),e.setProjectionBehavior(1),(0,s.aD)(e)}(e,t,n,d)}(e.get(),n,c,h,f,p,b,g,T);else if("b"===d)e.createCubicBezier(),function(e,t,n,a){e.dropAllAttributes();const s=new ArrayBuffer(32),o=new _({sz:32,buffer:s});let u=0;o.writeDouble(u,a[0].x),u+=8,o.writeDouble(u,a[0].y),u+=8,o.writeDouble(u,a[1].x),u+=8,o.writeDouble(u,a[1].y),u+=8,function(e,t,n,a){(0,r.g)(32<=a.size()),e.m_cp=(0,i.m)(i.P,2),e.m_cp[0].x=a.readDouble(0),e.m_cp[0].y=a.readDouble(8),e.m_cp[1].x=a.readDouble(16),e.m_cp[1].y=a.readDouble(24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y}(e,t,n,o)}(e.get(),n,c,N);else if("n"===d)e.createQuadraticRationalBezier(),function(e,t,n,r,i,a,s){e.dropAllAttributes();const o=new ArrayBuffer(40),u=new _({sz:40,buffer:o});let m=0;u.writeDouble(m,r.x),m+=8,u.writeDouble(m,r.y),m+=8,u.writeDouble(m,i),m+=8,u.writeDouble(m,a),m+=8,u.writeDouble(m,s),m+=8,function(e,t,n,r){e.m_cp.x=r.readDouble(0),e.m_cp.y=r.readDouble(8),e.m_weights[0]=r.readDouble(16),e.m_weights[1]=r.readDouble(24),e.m_weights[2]=r.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y}(e,t,n,u)}(e.get(),n,c,N[0],N[1].x,N[1].y,N[2].x);else if("q"===d)e.createQuadraticBezier(),e.get().construct(n,N[0],c);else{e.createEllipticArc();const t=!1;A(e.get(),n,c,v,t,-1,-1)}return u}function A(e,t,n,a,o,u,m){e.dropAllAttributes();const l=new ArrayBuffer(20),d=new _({sz:20,buffer:l});let c=0;d.writeDouble(c,a.x),c+=8,d.writeDouble(c,a.y),c+=8;let h=0;o?(m||(h|=8),u&&(h|=16)):h|=128,d.writeInt32(c,h),c+=4,function(e,t,n,a){0>=a.size()&&(0,r.w)("Byte_buffer out of range access"),e.m_bits=0,e.m_rotation=0,e.m_cosr=1,e.m_sinr=0,e.setStartXY(t),e.setEndXY(n);const o=i.P.getNAN();o.x=a.readDouble(0),o.y=a.readDouble(8);const u=a.readInt32(16);if(1&u)return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(o),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,s.aD)(e),!1;let m=!!(64&u);const l=!!(128&u);let d=!!(32&u);const c=!!(8&u),h=!!(16&u),_=t.equals(n);m&&!_&&(m=!1,d=!0),d&&_&&(m=!0,d=!1,o.setCoords(0,0)),m||(l?d?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(o),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,n,o),_&&c===e.isClockwise()&&e.reverse()):d?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,s.aD)(e),e.queryCoord2D(.5,e.m_interior)):(0,s.aE)(e,t,n,o,c,h)),m&&(e.m_center.assign(t),e.m_startAngle=o.x,e.m_sweepAngle=o.y,(0,s.aF)(e,Number.NaN,c,h),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),(0,s.aD)(e)}(e,t,n,d)}function S(e,t,n,i,a){const o=e.getGeometryType();if(o===r.G.enumEllipticArc)return function(e,t,n,i,a){(0,r.g)(!(0,s.aw)(e));const o=e.getEndXY(),u=e.hasAttribute(1)&&!t,m=e.hasAttribute(2)&&!n;let l=Number.NaN,d=Number.NaN;if(u&&(l=e.getEndAttributeAsDbl(1,0)),m&&(d=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return C(u,m,o.x,o.y,l,d,i,a),!0;const c=0===e.projectionBehavior(),h=!!c&&e.isClosed();if(c&&!h)a.startObject(),a.addFieldName("c"),a.startArray(),C(u,m,o.x,o.y,l,d,i,a),D(e.m_interior.x,e.m_interior.y,17,a),a.endArray(),a.endObject();else if(c){a.startObject(),a.addFieldName("a"),a.startArray(),C(u,m,o.x,o.y,l,d,i,a);const t=0,n=0;D(e.m_center.x+t,e.m_center.y+n,17,a);const r=!e.isMajor();a.addInt32(r?1:0);const s=e.isClockwise();a.addInt32(s?1:0),a.endArray(),a.endObject()}else{a.startObject(),a.addFieldName("a"),a.startArray(),C(u,m,o.x,o.y,l,d,i,a);const t=e;D(t.m_center.x,t.m_center.y,17,a);const n=!t.isMajor();a.addInt32(n?1:0);const r=t.isClockwise();a.addInt32(r?1:0),a.addDouble(t.m_rotation,17),a.addDouble(t.m_semiMajorAxis,17),a.addDouble(t.m_minorMajorRatio,17),a.endArray(),a.endObject()}return!1}(e,t,n,i,a);if(o===r.G.enumBezier)return w(e,t,n,i,a);if(o===r.G.enumRationalBezier2)return function(e,t,n,r,i){const a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;s&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("n"),i.startArray(),C(s,o,a.x,a.y,u,m,r,i),D(e.m_cp.x,e.m_cp.y,r,i);const l=r;return i.addDouble(e.m_weights[0],l),i.addDouble(e.m_weights[1],l),i.addDouble(e.m_weights[2],l),i.endArray(),i.endObject(),!1}(e,t,n,i,a);if(o===r.G.enumBezier2){const r=new s.af;return r.constructFromQuadraticSegment(e),w(r,t,n,i,a)}(0,r.k)("")}function w(e,t,n,r,i){const a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;return s&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("b"),i.startArray(),C(s,o,a.x,a.y,u,m,r,i),D(e.m_cp[0].x,e.m_cp[0].y,r,i),D(e.m_cp[1].x,e.m_cp[1].y,r,i),i.endArray(),i.endObject(),!1}function C(e,t,n,r,i,a,s,o){o.startArray(),o.addDouble(n,s),o.addDouble(r,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}function D(e,t,n,r){r.startArray(),r.addDouble(e,n),r.addDouble(t,n),r.endArray()}function F(e,t,n,i){const a=n.getImpl(),o=!!(2&t),u=!!(4&t),m=!!(8&t),l=a.hasAttribute(1)&&!o,d=a.hasAttribute(2)&&!u,c=a.hasAttribute(3)&&!m,h=a.hasNonLinearSegments();l&&(i.addFieldName("hasZ"),i.addBool(!0)),d&&(i.addFieldName("hasM"),i.addBool(!0)),e?h?i.addFieldName("curveRings"):i.addFieldName("rings"):h?i.addFieldName("curvePaths"):i.addFieldName("paths");let _=null;const f=[];if(n.isEmpty())i.startArray(),i.endArray();else{const e=17-(31&t>>13);i.startArray();const m=n.getPathCount();let p=0;const k=a.getAttributeStreamRef(0);let b=null,g=null,y=null;const T=new s.S;let N=null,v=null,x=null;h&&(N=a.getSegmentFlagsStreamRef(),v=a.getSegmentIndexStreamRef(),x=a.getSegmentDataStreamRef()),l&&(b=a.getAttributeStreamRef(1)),d&&(g=a.getAttributeStreamRef(2)),c&&(y=a.getAttributeStreamRef(3),_=(0,s.aH)(3,0));for(let t=0;t<m;t++){i.startArray(),c&&f.push(0);const a=n.getPathEnd(t);if(p===a){i.endArray();continue}const s=n.isClosedPath(t);let m=k.read(2*p),h=k.read(2*p+1),A=l?b.read(p):Number.NaN,w=d?g.read(p):Number.NaN,C=c?y.read(p):0;j(l,d,m,h,A,w,e,i);let D=1;c&&(_.add(C),f[f.length-1]++);const F=m,z=h,I=A,E=w,O=C;let G=!1,P=0,B=Number.NaN,V=Number.NaN,M=0;for(let t=p+1,n=p,R=s?a+1:a;t<R;t++,n++){const s=null!==N?31&N.read(n):1;let p,R;if(t<a?(p=k.read(2*t),R=k.read(2*t+1),l&&(B=b.read(t)),d&&(V=g.read(t)),c&&(M=y.read(t))):(p=F,R=z,B=I,V=E,M=O),1!==s){G=!0,4===s?T.createEllipticArc():2===s?T.createCubicBezier():16===s?T.createQuadraticBezier():8===s?T.createQuadraticRationalBezier():(0,r.k)("JSON export.unsupported curve");const t=T.get(),a=v.read(n);t.setStartXYCoords(m,h),t.setEndXYCoords(p,R),l&&(t.setStartAttribute(1,0,A),t.setEndAttribute(1,0,B)),d&&(t.setStartAttribute(2,0,w),t.setEndAttribute(2,0,V)),t.readFromBufferStream(x,a),S(T.get(),o,u,e,i)&&P++}else j(l,d,p,R,B,V,e,i);c&&(_.add(M),f[f.length-1]++),D++,m=p,h=R,A=B,w=V,C=M}G&&0===P||(D<2&&P<1&&(j(l,d,m,h,A,w,e,i),D++,c&&(_.add(C),f[f.length-1]++)),s&&D<3&&P<2&&(j(l,d,F,z,I,E,e,i),D++,m=F,h=z,A=I,w=E,C=O,c&&(_.add(O),f[f.length-1]++))),i.endArray(),p=a}i.endArray()}if(c){i.addFieldName("ids"),i.startArray();let e=0;for(let t=0,n=f.length;t<n;++t){const n=f[t];(0,r.g)(0===n||null!==_&&e+n<=_.size()),i.startArray();for(let t=0;t<n;++t)i.addInt32(_.read(e)),e++;i.endArray()}i.endArray()}}function j(e,t,n,r,i,a,s,o){o.startArray(),o.addDouble(n,s),o.addDouble(r,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}const z="a".charCodeAt(0),I="A".charCodeAt(0),E="*".charCodeAt(0),O="b".charCodeAt(0),G=("\b".charCodeAt(0),"\\".charCodeAt(0)),P="[".charCodeAt(0),B="{".charCodeAt(0),V=":".charCodeAt(0),M=".".charCodeAt(0),R=",".charCodeAt(0),U='"'.charCodeAt(0),X="]".charCodeAt(0),W="}".charCodeAt(0),L="e".charCodeAt(0),Y="E".charCodeAt(0),K="f".charCodeAt(0),q=("\f".charCodeAt(0),"F".charCodeAt(0)),Z="/".charCodeAt(0),H=("<".charCodeAt(0),"-".charCodeAt(0)),Q="+".charCodeAt(0),J="n".charCodeAt(0),$="N".charCodeAt(0),ee=("\n".charCodeAt(0),"r".charCodeAt(0)),te=("\r".charCodeAt(0),"t".charCodeAt(0)),ne=("\t".charCodeAt(0),"u".charCodeAt(0)),re="0".charCodeAt(0),ie="9".charCodeAt(0);class ae{constructor(e){this.m_functionStack=[],this.m_pushPositions=[],this.m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0}),void 0===e?(this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_endToken=0,this.m_currentTokenType=0,this.m_functionStack.push((()=>this.accept_())),this.m_jsonString=null,this.m_bHasEscapes=!1):e.jsonString?this.resetParserFromString(e.jsonString):e.jsonStream?(0,r.k)("streaming json parsing not yet impl"):(0,r.a)("invalid constructor parameter")}prepSubstrString_(){}getCurrentSubstrString_(){return this.m_jsonString.slice(this.m_startToken,this.m_endToken)}stepOverCharString_(){this.m_endToken++}peekCharString_(){return this.m_jsonString.charCodeAt(this.m_endToken)}getString_(e){const t=this.m_jsonString?.slice(this.m_startToken,this.m_startToken+e-1);return this.m_endToken+=e-1,{s:t,bDone:this.m_endToken>=this.m_jsonString.length}}incrementString_(){this.m_endToken++}eofString_(){return this.m_endToken>=this.m_jsonString.length}setStringFunctions_(){this.m_prepSubstr=this.prepSubstrString_,this.m_getCurrentSubstr=this.getCurrentSubstrString_,this.m_stepOverChar=this.stepOverCharString_,this.m_peekChar=this.peekCharString_,this.m_get=this.getString_,this.m_increment=this.incrementString_,this.m_eof=this.eofString_}setStreamFunctions_(){(0,r.k)("streaming json parsing not yet impl")}reset_(){this.m_jsonString=null,this.m_endToken=0,this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_currentTokenType=0,this.m_bHasEscapes=!1,this.m_functionStack.length=0,this.m_functionStack.push((()=>this.start_())),this.m_pushPositions.length=0}resetParserFromString(e){this.reset_(),this.setStringFunctions_(),this.m_jsonString=e}resetParserFromStream(e){(0,r.k)("streaming json parsing not yet impl")}resetToPosition(e){return(0,r.g)(0),!1}nextToken(){return this.m_functionStack.at(-1)(),this.m_currentTokenType}currentToken(){return this.m_currentTokenType}currentTokenStartIndex(){return this.m_startToken}currentTokenEndIndex(){return this.m_endToken}currentText(){return(0,r.g)(0),""}childrenAsString(){return(0,r.g)(0),""}skipChildren(){this.skipChildren_()}skipChildren_(){if(1!==this.m_currentTokenType)if(2!==this.m_currentTokenType);else{let e=1;do{this.m_currentTokenType=this.nextToken(),2===this.m_currentTokenType?e++:4===this.m_currentTokenType&&e--}while(4!==this.m_currentTokenType||0!==e)}else{let e=1;do{this.m_currentTokenType=this.nextToken(),1===this.m_currentTokenType?e++:3===this.m_currentTokenType&&e--}while(3!==this.m_currentTokenType||0!==e)}}currentTerminalAsString_(){switch(this.m_currentTokenType){case 7:case 8:case 9:return this.m_getCurrentSubstr().slice(0,this.m_endToken-this.m_startToken);case 10:return"null";case 11:return"true";case 12:return"false"}(0,r.t)("invalid token")}toUTF8_(e,t){let n=0,r=e;for(;t.charCodeAt(r)===G&&t.charCodeAt(r+1)===ne;)n++,r+=6;r=e;const i=new Uint8Array(n);let a=0;for(;t.charCodeAt(r)===G&&t.charCodeAt(r+1)===ne;)i[a++]=Number.parseInt(t.slice(r+2,r+6),16),r+=6;return{u8s:this.m_utf8Decoder.decode(i),end:r}}unquoteCurrentString_(){let e="",t=1;const n=this.m_endToken-this.m_startToken-1;let r=0;const i=this.m_getCurrentSubstr();for(let a=t;a<n;a++)if(i.charCodeAt(a)!==G)r++;else{switch(r>0&&(e+=i.slice(t,t+r)),i.charCodeAt(++a)){case U:e+='"';break;case ne:{const{u8s:t,end:n}=this.toUTF8_(a-1,i);a=n-1,e+=t;break}case G:e+="\\";break;case Z:e+="/";break;case O:e+="\b";break;case K:e+="\f";break;case J:e+="\n";break;case ee:e+="\r";break;case te:e+="\t"}t=a+1,r=0}return r>0&&(e+=i.slice(t,t+r)),e}currentString(){return 5!==this.m_currentTokenType&&6!==this.m_currentTokenType?this.currentTerminalAsString_():this.m_bHasEscapes?this.unquoteCurrentString_():this.m_getCurrentSubstr().slice(1,this.m_endToken-this.m_startToken-2+1)}currentDoubleValue(){if(7!==this.m_currentTokenType&&8!==this.m_currentTokenType&&9!==this.m_currentTokenType&&6!==this.m_currentTokenType&&10!==this.m_currentTokenType&&(0,r.t)("invalid token"),10===this.m_currentTokenType)return Number.NaN;let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;if(6===this.m_currentTokenType){if("NaN"===this.currentString())return Number.NaN;e=e.slice(1),t-=2,0===t&&(0,r.t)("invalid token")}const n=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(n)&&(0,r.t)("invalid token");else if(Number.isNaN(n))return Number.NaN;return n}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&(0,r.t)("invalid token");let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;6===this.m_currentTokenType&&(e=e.slice(1),t-=2,0===t&&(0,r.t)("invalid token"));const n=parseInt(e);return Number.isNaN(n)&&(0,r.t)("invalid token"),n}currentInt64Value(){return(0,r.g)(0),0n}currentBoolValue(){return(0,r.g)(0),!1}isError(){return 0}JSONString(){return(0,r.g)(0),""}pushPosition(){return(0,r.g)(0),!1}popPosition(){return(0,r.g)(0),!1}skipCStyleComments_(){(0,r.g)(0)}skipCppStyleComments_(){(0,r.g)(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar(),e===E?this.skipCStyleComments_():e===Z?this.skipCppStyleComments_():(0,r.t)("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&(0,r.t)("invalid token");let t=this.m_peekChar();for(;t>=9&&t<=13||32===t;)this.m_increment(),this.m_eof()&&(0,r.t)("invalid token"),t=this.m_peekChar();t===Z?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return this.m_peekChar()===X&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return this.m_peekChar()===W&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=3,!0)}string_(){this.m_prepSubstr(),this.m_bHasEscapes=!1,this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token");let e=this.m_peekChar();for(;e!==U;){const t=e===G;if(this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar(),t)if(this.m_bHasEscapes=!0,e===U||e===G||e===Z||e===O||e===K||e===J||e===ee||e===te)this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar();else if(e===ne)for(let t=0;t<4;t++)this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar(),e>=re&&e<=ie||e>=z&&e<=K||e>=I&&e<=q||(0,r.t)("invalid token");else(0,r.t)("invalid token")}this.m_stepOverChar()}comma_(){return this.m_peekChar()===R&&(this.m_increment(),!0)}colon_(){return this.m_peekChar()===V&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):(0,r.t)("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken,this.m_peekChar()!==U&&(0,r.t)("invalid token"),this.string_(),this.m_currentTokenType=5,this.m_functionStack.push((()=>this.fieldNameEnd_()))}pairEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.fieldNameStart_()):this.rightBrace_()?this.m_functionStack.pop():(0,r.t)("invalid token")}arrayStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBracket_()||(this.m_functionStack.push((()=>this.elementEnd_())),this.value_())}elementEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.value_()):this.rightBracket_()?this.m_functionStack.pop():(0,r.t)("invalid token")}objectStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBrace_()||(this.m_functionStack.push((()=>this.pairEnd_())),this.fieldNameStart_())}valueStartObject_(){this.m_increment(),this.m_currentTokenType=1,this.m_functionStack.push((()=>this.objectStart_()))}valueStartArray_(){this.m_increment(),this.m_currentTokenType=2,this.m_functionStack.push((()=>this.arrayStart_()))}valueString_(){this.string_(),this.m_currentTokenType=6}int_(){this.m_peekChar()!==re?this.digits_():this.m_stepOverChar()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar()}while(e>=re&&e<=ie)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar(),e>=re&&e<=ie||(0,r.t)("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar(),e!==Q&&e!==H||(this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),e=this.m_peekChar()),e>=re&&e<=ie||(0,r.t)("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,t=this.m_peekChar();if(t===H?(this.m_stepOverChar(),this.m_eof()&&(0,r.t)("invalid token"),t=this.m_peekChar(),e=!0,t>=re&&t<=ie||(0,r.t)("invalid token"),this.int_()):this.int_(),t=this.m_peekChar(),t===M)this.m_currentTokenType=7,this.frac_(),t=this.m_peekChar(),t!==L&&t!==Y||this.exp_();else if(t===L||t===Y)this.m_currentTokenType=7,this.exp_();else{let t=0;e&&t++;const n=this.m_endToken-this.m_startToken-t;if(n<10)this.m_currentTokenType=8;else if(10===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="2147483648"?this.m_currentTokenType=8:this.m_currentTokenType=9:n.slice(t)<="2147483647"?this.m_currentTokenType=8:this.m_currentTokenType=9}else if(n<19)this.m_currentTokenType=9;else if(19===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="9223372036854775808"?this.m_currentTokenType=9:this.m_currentTokenType=7:n.slice(t)<="9223372036854775807"?this.m_currentTokenType=9:this.m_currentTokenType=7}else this.m_currentTokenType=7}}valueNull_(){const{s:e,bDone:t}=this.m_get(5);t&&(0,r.t)("invalid token"),"null"!==e&&(0,r.t)("invalid token"),this.m_currentTokenType=10}valueTrue_(){const{s:e,bDone:t}=this.m_get(5);t&&(0,r.t)("invalid token"),"true"!==e&&(0,r.t)("invalid token"),this.m_currentTokenType=11}valueFalse_(){const{s:e,bDone:t}=this.m_get(6);t&&(0,r.t)("invalid token"),"false"!==e&&(0,r.t)("invalid token"),this.m_currentTokenType=12}valueNan_(){const{s:e,bDone:t}=this.m_get(4);t&&(0,r.t)("invalid token"),"NaN"!==e&&(0,r.t)("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;const e=this.m_peekChar();e===B?this.valueStartObject_():e===P?this.valueStartArray_():e===U?this.valueString_():e===H||e>=re&&e<=re+9?this.valueNumber_():e===J?this.valueNull_():e===te?this.valueTrue_():e===K?this.valueFalse_():e===$?this.valueNan_():(0,r.t)("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push((()=>this.accept_()));const e=this.m_peekChar();e!==B&&e!==P&&(0,r.t)("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}const se=new class{constructor(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject=[]}reset(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject.length=0}startObject(){const e={};this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}startArray(){const e=[];this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}endObject(){this.m_acceptedObject=this.m_currentObject.at(-1),this.m_currentObject.pop()}endArray(){this.m_currentObject.pop()}addFieldName(e){this.m_pendingKey=e}addValue_(e){this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):this.m_currentObject.at(-1).push(e)}addString(e){this.addValue_(e)}addDouble(e,t){this.addValue_(e)}addInt64(e){(0,r.g)(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}},oe=new class{getOperatorType(){return 10405}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,i,s,o){!function(e,t,n,i){if(t||n){if(i.startObject(),null!==t)switch(t.getGeometryType()){case r.G.enumPolygon:F(!0,e,t,i);break;case r.G.enumPolyline:F(!1,e,t,i);break;case r.G.enumMultiPoint:!function(e,t,n){const i=t.getImpl(),a=i.hasAttribute(1)&&!(2&e),s=i.hasAttribute(2)&&!(4&e),o=i.hasAttribute(3)&&!(8&e);a&&(n.addFieldName("hasZ"),n.addBool(!0)),s&&(n.addFieldName("hasM"),n.addBool(!0)),n.addFieldName("points");const u=t.getPointCount();if(t.isEmpty())n.startArray(),n.endArray();else{const t=17-(31&e>>13);n.startArray();const r=i.getAttributeStreamRef(0);let o=null,m=null;a&&(o=i.getAttributeStreamRef(1)),s&&(m=i.getAttributeStreamRef(2));for(let e=0;e<u;e++){const i=r.read(2*e),u=r.read(2*e+1);let l=Number.NaN,d=Number.NaN;a&&(l=o.read(e)),s&&(d=m.read(e)),j(a,s,i,u,l,d,t,n)}n.endArray()}if(o){let e=null;i.isEmpty()||(e=i.getAttributeStreamRef(3)),(0,r.g)(0===u||null!==e&&e.size()>=u),n.addFieldName("ids"),n.startArray();for(let t=0;t<u;t++)n.addInt32(e.read(t));n.endArray()}}(e,t,i);break;case r.G.enumPoint:!function(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("x"),n.addNull(),n.addFieldName("y"),n.addNull(),r&&(n.addFieldName("z"),n.addNull()),i&&(n.addFieldName("m"),n.addNull()),void(a&&(n.addFieldName("id"),n.addInt32(0)));const s=17-(31&e>>13);n.addFieldName("x"),n.addDouble(t.getX(),s),n.addFieldName("y"),n.addDouble(t.getY(),s),r&&(n.addFieldName("z"),n.addDouble(t.getZ(),s)),i&&(n.addFieldName("m"),n.addDouble(t.getM(),s)),a&&(n.addFieldName("id"),n.addInt32(t.getID()))}(e,t,i);break;case r.G.enumEnvelope:!function(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("xmin"),n.addNull(),n.addFieldName("ymin"),n.addNull(),n.addFieldName("xmax"),n.addNull(),n.addFieldName("ymax"),n.addNull(),r&&(n.addFieldName("zmin"),n.addNull(),n.addFieldName("zmax"),n.addNull()),i&&(n.addFieldName("mmin"),n.addNull(),n.addFieldName("mmax"),n.addNull()),void(a&&(n.addFieldName("idmin"),n.addInt32(0),n.addFieldName("idmax"),n.addInt32(0)));const s=17-(31&e>>13);if(n.addFieldName("xmin"),n.addDouble(t.getXMin(),s),n.addFieldName("ymin"),n.addDouble(t.getYMin(),s),n.addFieldName("xmax"),n.addDouble(t.getXMax(),s),n.addFieldName("ymax"),n.addDouble(t.getYMax(),s),r){const e=t.queryInterval(1,0);n.addFieldName("zmin"),n.addDouble(e.vmin,s),n.addFieldName("zmax"),n.addDouble(e.vmax,s)}if(i){const e=t.queryInterval(2,0);n.addFieldName("mmin"),n.addDouble(e.vmin,s),n.addFieldName("mmax"),n.addDouble(e.vmax,s)}if(a){const e=t.queryInterval(3,0);n.addFieldName("idmin"),n.addInt32(e.vmin),n.addFieldName("idmax"),n.addInt32(e.vmax)}}(e,t,i);break;case r.G.enumMultipatch:(0,r.g)(0);break;default:(0,r.a)("exportToJSON")}null!==n&&(i.addFieldName("spatialReference"),function(e,t,n){n.startObject();let i=0;t.isCustomWkid()||(i=t.getOldID());let s=0;const o=t.getVCS();if(null!==o&&(o.isCustomWkid()||(s=o.getOldID()),s<=0&&(i=0)),i>0){n.addFieldName("wkid"),n.addInt32(i);const e=t.getLatestID();if(e>0&&e!==i&&(n.addFieldName("latestWkid"),n.addInt32(e)),s>0){n.addFieldName("vcsWkid"),n.addInt32(s);const e=t.getLatestVerticalID();e!==s&&(n.addFieldName("latestVcsWkid"),n.addInt32(e))}}if(0===t.getCoordinateSystemType())n.addFieldName("wkid"),n.addNull(),null!==t.getUnit()&&(n.addFieldName("unit"),function(e,t,n){n.startObject();const i=t.getID();i<=0&&(0,r.t)("cannot export unit that has no valid WKID"),n.addFieldName("uwkid"),n.addInt32(i),n.endObject()}(0,t.getUnit(),n));else if(i<=0||1&e){let r="";64&e&&(r=t.getText2(),n.addFieldName("wkt2"),n.addString(r));const i=t.getText();i!==r&&(n.addFieldName("wkt"),n.addString(i))}if(16&e){const e=new a.S;t.queryPrecisionDescriptor(e),n.addFieldName("xyTolerance"),n.addDouble(e.getTolerance(0)),n.addFieldName("zTolerance"),n.addDouble(e.getTolerance(1)),n.addFieldName("mTolerance"),n.addDouble(e.getTolerance(2)),n.addFieldName("falseX"),n.addDouble(e.getFalseX()),n.addFieldName("falseY"),n.addDouble(e.getFalseY()),n.addFieldName("xyUnits"),n.addDouble(e.getGridUnitsXY()),n.addFieldName("falseZ"),n.addDouble(e.getFalseZ()),n.addFieldName("zUnits"),n.addDouble(e.getGridUnitsZ()),n.addFieldName("falseM"),n.addDouble(e.getFalseM()),n.addFieldName("mUnits"),n.addDouble(e.getGridUnitsM())}n.endObject()}(e,n,i)),i.endObject()}}(e,t,n,i)}exportSpatialReference(e,t,n,i){(0,r.g)(0)}exportProjectionTransformation(e,t,n,i){(0,r.g)(0)}exportDatumTransformation(e,t,n,i){(0,r.g)(0)}static geometryTypeToString(e){return(0,r.g)(0),""}},ue=new class{getOperatorType(){return 10404}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,i,o,u,m){let l;"string"==typeof n?(l=new ae({jsonString:n}),l.nextToken()):l=n,1!==l.currentToken()&&(0,r.t)("failed to import map geometry: start of object is expected");const d=function(e,t,n,i,a){let o=!1,u=!1,m=!1,l=!1,d=!1,c=!1,h=!1,_=!1,f=!1,N=!1,v=!1,x=!1,A=!1,S=!1,w=!1,C=!1,D=!1,F=!1,j=!1,z=!1,I=!1,E=!1,O=!1,G=!1,P=Number.NaN,B=Number.NaN,V=Number.NaN,M=Number.NaN,R=0,U=Number.NaN,X=Number.NaN,W=Number.NaN,L=Number.NaN,Y=Number.NaN,K=Number.NaN,q=Number.NaN,Z=Number.NaN,H=0,Q=0,J=!1,$=!1,ee=null,te=null,ne=null,re=null,ie=null;for(;3!==n.nextToken();){const t=n.currentString();if(n.nextToken(),"spatialReference"===t){if(a&&!o){o=!0,1===n.currentToken()?re=p(n):10!==n.currentToken()&&(0,r.t)("failed to parse spatial reference: object or null is expected");continue}}else if(i)if("hasZ"===t){if(!u){u=!0,J=11===n.currentToken();continue}}else if("hasM"===t){if(!m){m=!0,$=11===n.currentToken();continue}}else if("rings"===t){if(!(d||c||e!==r.G.enumUnknown&&e!==r.G.enumPolygon)){d=!0,({geometry:ie,as:ee,bs:te}=k(!0,!1,0,n));continue}}else if("curveRings"===t){if(!c&&(e===r.G.enumUnknown||e===r.G.enumPolygon)){c=!0,({geometry:ie,as:ee,bs:te}=k(!0,!0,0,n));continue}}else if("paths"===t){if(!(h||_||e!==r.G.enumUnknown&&e!==r.G.enumPolyline)){h=!0,({geometry:ie,as:ee,bs:te}=k(!1,!1,0,n));continue}}else if("curvePaths"===t){if(!_&&(e===r.G.enumUnknown||e===r.G.enumPolyline)){_=!0,({geometry:ie,as:ee,bs:te}=k(!1,!0,0,n));continue}}else if("points"===t){if(!f&&(e===r.G.enumUnknown||e===r.G.enumMultiPoint)){f=!0,({geometry:ie,as:ee,bs:te}=b(0,n));continue}}else if("ids"===t){if(!l){l=!0,ne=g(0,n);continue}}else if("x"===t){if(!N&&(e===r.G.enumUnknown||e===r.G.enumPoint)){N=!0,P=y(n);continue}}else if("y"===t){if(!v&&(e===r.G.enumUnknown||e===r.G.enumPoint)){v=!0,B=y(n);continue}}else if("z"===t){if(!x&&(e===r.G.enumUnknown||e===r.G.enumPoint)){x=!0,V=y(n);continue}}else if("m"===t){if(!A&&(e===r.G.enumUnknown||e===r.G.enumPoint)){A=!0,M=y(n);continue}}else if("id"===t){if(!S&&(e===r.G.enumUnknown||e===r.G.enumPoint)){S=!0,R=T(n);continue}}else if("xmin"===t){if(!w&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){w=!0,U=y(n);continue}}else if("ymin"===t){if(!C&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){C=!0,X=y(n);continue}}else if("mmin"===t){if(!I&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){I=!0,q=y(n);continue}}else if("zmin"===t){if(!j&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){j=!0,Y=y(n);continue}}else if("idmin"===t){if(!O&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){O=!0,H=T(n);continue}}else if("xmax"===t){if(!D&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){D=!0,W=y(n);continue}}else if("ymax"===t){if(!F&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){F=!0,L=y(n);continue}}else if("mmax"===t){if(!E&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){E=!0,Z=y(n);continue}}else if("zmax"===t){if(!z&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){z=!0,K=y(n);continue}}else if("idmax"===t){if(!G&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){G=!0,Q=T(n);continue}}else"materials"===t&&(0,r.g)(0);n.skipChildren()}if(d||c||h||_||f){let e=null,t=null;const n=ie;J&&(ie.addAttribute(1),e=ee,e||(e=(0,s.ax)(n.getPointCount(),Number.NaN))),$&&(ie.addAttribute(2),t=J?te:ee),null!=ne&&ie.addAttribute(3),J&&null!=e&&n.setAttributeStreamRef(1,e),$&&null!=t&&n.setAttributeStreamRef(2,t),null!=ne&&function(e,t){if(e.isEmpty())return;const n=(0,s.aC)(2,0),i=e.getGeometryType();let a=0;i===s.M.type?a=1:i===s.h.type||i===s.g.type?a=e.getPathCount():(0,r.a)("not implemented"),n.resize(e.getPointCount(),0);let o=0;for(let u=0;u<a;++u){const a=t.read(o);o++;const m=o+a;let l=0,d=0;i===s.M.type?l=e.getPointCount():i===s.h.type||i===s.g.type?(l=e.getPathSize(u),d=e.getPathStart(u)):(0,r.a)("not implemented");for(let e=0,r=Math.min(a,l);e<r;++e)n.write(d,t.read(o)),o++,d++;o=m}e.getImpl().setAttributeStreamRef(3,n)}(n,ne)}else if(N||v||A||x||S){(0,s.ay)(P,B)||(0,r.t)("failed to parse point: x and y must be finite or nan"),(Number.isNaN(B)||Number.isNaN(P))&&(P=Number.NaN,B=Number.NaN);const e=new s.P({x:P,y:B});x&&e.setZ(V),A&&e.setM(M),S&&e.setID(R),ie=e}else if(w||C||D||F||j||z||I||E||O||G){(Number.isNaN(X)||Number.isNaN(W)||Number.isNaN(L))&&(U=Number.NaN);const e=new s.E({xmin:U,ymin:X,xmax:W,ymax:L});j&&z&&e.setInterval(1,0,Y,K),I&&E&&e.setInterval(2,0,q,Z),O&&G&&e.setInterval(3,0,H,Q),ie=e}return{...ie?{geom:ie}:{},...re?{sr:re}:{}}}(t,0,l,i,o);return new a.a7(d)}importProjectionTransformation(e,t){return(0,r.g)(0),{}}importDatumTransformation(e,t){return(0,r.g)(0),{}}static stringToGeometryType(e){return r.G.enumPoint}};function me(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function le(e,t){const n=new h(e);return n.nextToken(),ue.execute(0,r.G.enumUnknown,n,!0,t)}function de(e){let t=null;return[e.map((e=>{if(null==t){const n=ce(e);return t=n.getSpatialReference(),n.getGeometry()}return he(e)})),t]}function ce(e){return le(e,!0)}function he(e){return le(e,!1).getGeometry()}function _e(e,t){return e instanceof a.a7&&(t=e.getSpatialReference(),e=e.getGeometry()),se.reset(),oe.execute(0,e,t,se),se.getObject()}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3600],{13600:(e,t,i)=>{i.r(t),i.d(t,{default:()=>je});var r=i(90237),s=i(13874),n=(i(86162),i(52464),i(65345),i(42980),i(20917),i(92438),i(96576),i(93618),i(65494)),o=i(15036),a=i(78888),l=i(61147),u=i(69540),d=i(5503),p=i(49186),y=i(4718),c=i(53966),h=i(92071),f=i(93637),m=i(74887),g=i(39516),b=i(84952),w=i(67076),_=i(10107),v=i(79901),F=i(36005),S=i(40608),T=i(43937),I=i(89317),M=i(24070),E=i(16930),A=i(4146),D=(i(59456),i(52106)),q=i(44208),O=i(92474),Z=i(61893),C=i(29953),j=i(56507),L=(i(87811),i(7695)),x=i(96520),P=i(58501),R=i(22671),G=i(5443),J=i(39829),N=i(50498);let k=0,V=class extends(O.A.LoadableMixin(Z.A.EsriPromiseMixin(d.A))){constructor(e){super(e),this._idToClientGraphic=null,this.type="memory"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}async queryFeatures(e,t={}){await this.load(t);const i=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);(0,P.q)(e,this.layer.spatialReference,i);const r=R.A.fromJSON(i);if(!this._requiresClientGraphicMapping())return r;const s=this.layer.objectIdField;for(const e of r.features){const t=e.attributes[s],i=this._idToClientGraphic.get(t);i&&(e.geometry=i.geometry)}return r.geometryType=this.layer.geometryType,r}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new p.A("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);const i=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return(0,P.q)(e,this.layer.spatialReference,i),i}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:G.A.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke("queryAttributeBins",e?.toJSON(),t)}async _applyEdits(e){if(!this._connection)throw new p.A("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField;let i=null;const r=[],s=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const n=e=>"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(i=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const t of e.deleteFeatures){const e=n(t);null!=e&&r.push(e)}const o=e.updateFeatures&&this._idToClientGraphic?new Map:null;if(e.updateFeatures)for(const t of e.updateFeatures)if(s.push(this._serializeFeature(t)),o){const e=n(t);null!=e&&o.set(e,t)}(0,x.u)(i?i.features:null,s,this.layer.spatialReference);const{fullExtent:a,featureEditResults:l}=await this._connection.invoke("applyEdits",{adds:i?i.features:[],updates:s,deletes:r});return this.fullExtent=a,i&&i.finish(l.uidToObjectId),this._updateClientGraphicIds(o,l),this._createEditsResult(l)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||null==e)return;const i=[];for(const{geometry:r}of e)null==r||"mesh"!==r.type||r.hasExtent||r.loaded||i.push(r.load({signal:t}));i.length&&await Promise.all(i)}_updateClientGraphicIds(e,t){if(this._idToClientGraphic){if(e)for(const i of t.updateResults){if(!i.success)continue;const t=e.get(i.objectId);null!=t&&this._addIdToClientGraphic(t)}for(const e of t.deleteResults)e.success&&this._idToClientGraphic.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new p.A("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,i=new Array(e.length);let r=null;for(let s=0;s<e.length;s++){const n=e[s],o=this._serializeFeature(n);r||null==n.geometry||(r=n.geometry.type),i[s]=o,t.set(`${o.uid}`,n)}const s=this;return{features:i,inferredGeometryType:r,finish(e){const i=s.sourceJSON.objectIdField;for(const r in e){const n=e[r],o=t.get(r);o&&(o.attributes||(o.attributes={}),-1===n?delete o.attributes[i]:o.attributes[i]=n,s._addIdToClientGraphic(o))}}}}_addIdToClientGraphic(e){if(!this._idToClientGraphic)return;const t=this.sourceJSON.objectIdField,i=e.attributes?.[t];null!=i&&this._idToClientGraphic.set(i,e)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,i=this._geometryForSerialization(e),r=(k++).toString();return i?{uid:r,geometry:i.toJSON(),attributes:t}:{uid:r,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?J.A.fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await(0,C.ho)("MemorySourceWorker",{strategy:(0,q.A)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:i,objectIdField:r,hasM:s,hasZ:n,timeInfo:o,dateFieldsTimeZone:a}=this.layer,l="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const u=this._prepareAddFeatures(this.items);this.addHandles(this.on("before-changes",(e=>{c.A.getLogger(this).error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()})));const d={features:u.features,fields:t?.map((e=>e.toJSON())),geometryType:N.Y.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&s,hasZ:"mesh"===this._layerOrSourceGeometryType||n,objectIdField:r,spatialReference:l?null:i&&i.toJSON(),timeInfo:o?.toJSON()??null,dateFieldsTimeZone:a},p=await this._connection.invoke("load",d,{signal:e});for(const e of p.warnings)c.A.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});p.featureErrors.length&&c.A.getLogger(this.layer).warn("#load()",`Encountered ${p.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:p.featureErrors});const y=p.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(u.inferredGeometryType)&&(y.geometryType=N.Y.toJSON(u.inferredGeometryType)),this.sourceJSON=y,this._requiresClientGraphicMapping()&&(this._idToClientGraphic=new Map),u.finish(p.assignedObjectIds)}};(0,r._)([(0,L.u)({Type:D.A,ensureType:(0,j.dp)(D.A)})],V.prototype,"itemType",void 0),(0,r._)([(0,_.MZ)()],V.prototype,"type",void 0),(0,r._)([(0,_.MZ)({constructOnly:!0})],V.prototype,"layer",void 0),(0,r._)([(0,_.MZ)({readOnly:!0})],V.prototype,"_workerGeometryType",null),(0,r._)([(0,_.MZ)()],V.prototype,"sourceJSON",void 0),V=(0,r._)([(0,S.$)("esri.layers.graphics.sources.MemorySource")],V);var $=i(52136),Q=i(18768),W=i(63074),z=i(69208),B=i(47685),X=i(87718),K=i(87796),H=i(76294),Y=i(16131),U=i(32756),ee=i(8303),te=i(69622);let ie=class extends te.A{constructor(){super(...arguments),this.updating=!1,this.status="unknown"}};(0,r._)([(0,_.MZ)()],ie.prototype,"updating",void 0),(0,r._)([(0,_.MZ)()],ie.prototype,"status",void 0),ie=(0,r._)([(0,S.$)("esri.layers.support.PublishingInfo")],ie);const re=ie,se=Symbol(),ne=e=>{var t;let i=class extends e{constructor(){super(...arguments),this[t]=!0}get publishingInfo(){if(this.destroyed)return null;const e=this._get("publishingInfo");if(e)return e;const t=new re;return this._checkPublishingStatus(t),t}_checkPublishingStatus(e){let t=0;const i=async s=>{let n;e.updating=!0;try{n=await this.fetchPublishingStatus()}catch(e){n="unavailable"}"published"!==n&&"unavailable"!==n||("publishing"===e.status&&this.refresh(),r.remove()),e.status=n,e.updating=!1,r.removed||(t=setTimeout(i,s,s+125))},r={removed:!1,remove(){this.removed=!0,clearTimeout(t)}};this.when().catch((()=>r.remove())),i(250),this.addHandles(r)}};return t=se,(0,r._)([(0,_.MZ)({readOnly:!0,clonable:!1})],i.prototype,"publishingInfo",null),i=(0,r._)([(0,S.$)("esri.layers.mixins.PublishableLayer")],i),i};var oe=i(54310),ae=i(25036),le=i(82935),ue=i(60694),de=i(10873),pe=i(15426),ye=i(29005),ce=i(33143),he=i(17036),fe=i(30524),me=i(81457),ge=i(39383),be=i(22453),we=i(96184),_e=i(91908),ve=i(27733),Fe=i(8947),Se=i(61956),Te=i(30291),Ie=i(35093),Me=i(92935),Ee=i(78553);const Ae="FeatureLayer";function De(e,t){return new p.A("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function qe(e){return e&&e instanceof d.A}const Oe=(0,he.p)();function Ze(e,t,i){const r=!!i?.writeLayerSchema;return{enabled:r,ignoreOrigin:r}}let Ce=class extends((0,K.j)((0,H.J)((0,X.F)(ne((0,B.w6)((0,W.dM)((0,U.fY)((0,le.e)((0,ae.j)((0,oe.J)((0,Q.b)((0,Y.q)((0,ee.A)((0,h.P)((0,z.d)((0,$.p)(u.A.ClonableMixin(A.A)))))))))))))))))){constructor(...e){super(...e),this.attributeTableTemplate=null,this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.resourceInfo=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=E.A.WGS84,this.subtypeCode=null,this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=(0,m.sg)((async(e,t,r)=>{const{save:s,saveAs:n}=await i.e(3359).then(i.bind(i,33359));switch(e){case Me.X.SAVE:return s(this,t);case Me.X.SAVE_AS:return n(this,r,t)}}))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then((e=>this.initLayerProperties(e)))),Promise.resolve(this);const i=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e).catch(m.QP).then((async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new p.A("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))})).then((()=>(0,pe.VA)(this,"load",e)));return this.addResolvingPromise(i),Promise.resolve(this)}warnInvisibleDrapedSymbols(){"on-the-ground"===this.elevationInfo?.mode&&"simple"===this.renderer?.type&&"polygon-3d"===this.renderer.symbol?.type&&this.renderer.symbol.symbolLayers.some((e=>"fill"===e.type&&null!=e.material&&(!e.material.color||e.material.color.a*this.opacity<Ie.Q)&&(this.loadWarnings.push(new w.A("feature-layer:invisible-draped-symbols","FeatureLayer has fully transparent symbols which will no longer render or highlight",{layer:this})),!0)))}readCapabilities(e,t){return t=t.layerDefinition||t,(0,be.S)(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,i){return this._readEditingEnabled(t,!0,i)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,i,r){this._writeEditingEnabled(e,t,!0,r)}get effectiveEditingEnabled(){return(0,pe.C$)(this)}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,i,r){r?.writeLayerSchema&&(0,f.sM)(i,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return(0,pe.jD)(t.layerDefinition||t)}readObjectIdField(e,t){return(0,pe.Zm)(t.layerDefinition||t)}get parsedUrl(){const e=(0,b.An)(this.url);return null!=e&&(null!=this.dynamicDataSource?e.path=(0,b.fj)(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=(0,b.fj)(e.path,this.layerId.toString()))),e}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,fe.yp)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,i){t=t.layerDefinition||t;const r=t.drawingInfo?.renderer;if(r){const e=(0,n.L)(r,t,i)??void 0;return e||c.A.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:i}),e}return(0,pe.PD)(t,i)}set source(e){const t=this._get("source");t!==e&&(qe(t)&&this._resetMemorySource(t),qe(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof d.A?new V({layer:this,items:e}):e:null}readSource(e,t){const i=R.A.fromJSON(t.featureSet);return new V({layer:this,items:i?.features??[]})}readTemplates(e,t){const i=t.editFieldsInfo,r=i?.creatorField,s=i?.editorField;return e=e?.map((e=>ye.A.fromJSON(e))),this._fixTemplates(e,r),this._fixTemplates(e,s),e}readTitle(e,t){const i=t.layerDefinition?.name??t.name,r=t.title||t.layerDefinition?.title;if(i){const e=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,ue.yG)(this.url,i):i;let t=i;if(!t&&this.url){const e=(0,ue.qg)(this.url);null!=e&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),(0,ue.cr)(t)}if("item-title"===this.sublayerTitleMode&&r)return r}readTitleFromWebMap(e,t){return t.title||t.layerDefinition?.name}readTypeIdField(e,t){let i=(t=t.layerDefinition||t).typeIdField;if(i&&t.fields){i=i.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===i));e&&(i=e.name)}return i}readTypes(e,t){e=(t=t.layerDefinition||t).types;const i=t.editFieldsInfo,r=i?.creatorField,s=i?.editorField;return e?.map((e=>(e=ce.A.fromJSON(e),this._fixTemplates(e.templates,r),this._fixTemplates(e.templates,s),e)))}readVisible(e,t){return null!=t.layerDefinition?.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){const i=await(0,pe.Xl)(this,e,t,Ae);return this.lastEditsEventDate=new Date,i}async updateAttachment(e,t,i){const r=await(0,pe.bt)(this,e,t,i,Ae);return this.lastEditsEventDate=new Date,r}async applyEdits(e,t){return(0,pe.ct)(this,e,t)}async uploadAssets(e,t){return(0,pe.rn)(this,e,t)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,Te.tn)(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await(0,m.qr)(Promise.all([i.e(893),i.e(2593)]).then(i.bind(i,72593)),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=(0,pe.VZ)(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,i=(0,g.m)(this.definitionExpression,t);return e.where=i||"1=1",e}async deleteAttachments(e,t){const i=await(0,pe.mm)(this,e,t,Ae);return this.lastEditsEventDate=new Date,i}async fetchRecomputedExtents(e){return(0,pe.WP)(this,e,Ae)}getFeatureType(e){return(0,pe.xd)(this.types,this.typeIdField,e)}getFieldDomain(e,t){const i=t?.feature,r=!!this.subtypes?.length;if(r&&!t?.excludeImpliedDomains){const t=(0,pe.pc)(this,e);if(t)return t}const s=r&&(0,pe.Nv)(this,i);if(s){const t=s?.domains?.[e];return"inherited"===t?.type?this._getLayerDomain(e):t}const n=this.getFeatureType(i),o=this._getLayerDomain(e);if(n){const t=n.domains&&n.domains[e];if(t&&"inherited"!==t?.type)return t}if(o)return o;if(!t?.excludeImpliedDomains){const t=(0,pe.hx)(this,e);if(t)return t}return null}getField(e){return this.fieldsIndex.get(e)}async queryAttachments(e,t){return(0,pe.lV)(this,e,t,Ae)}async queryFeatures(e,t){const i=await this.load(),r=await i.source.queryFeatures(Se.A.from(e)??i.createQuery(),t);if(r?.features)for(const e of r.features)e.layer=e.sourceLayer=i;return r}async queryObjectIds(e,t){return(0,pe.sg)(this,e,t,Ae)}async queryFeatureCount(e,t){return(0,pe.Ye)(this,e,t,Ae)}async queryExtent(e,t){return(0,pe.B5)(this,e,t,Ae)}async queryRelatedFeatures(e,t){return(0,pe.hM)(this,e,t,Ae)}async queryRelatedFeaturesCount(e,t){return(0,pe.S2)(this,e,t,Ae)}async queryTopFeatures(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopFeatures||!s?.query?.supportsTopFeaturesQuery)throw new p.A(Ae,"Layer source does not support queryTopFeatures capability");const n=await i.e(7561).then(i.bind(i,57561)),o=await r.queryTopFeatures(n.default.from(e),t);if(o?.features)for(const e of o.features)e.layer=e.sourceLayer=this;return o}async queryAttributeBins(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryAttributeBins||!s?.operations?.supportsQueryBins)throw new p.A(Ae,"Layer source does not support queryAttributeBins capability");(0,pe.ZJ)(e,s,Ae);const n=await Promise.all([i.e(4575),i.e(7136)]).then(i.bind(i,14575)),o=await r.queryAttributeBins(n.default.from(e),t);if(o.features)for(const e of o.features)e.layer=e.sourceLayer=this;return o}async queryTopObjectIds(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopObjectIds||!s?.query.supportsTopFeaturesQuery)throw new p.A(Ae,"Layer source does not support queryTopObjectIds capability");const n=await i.e(7561).then(i.bind(i,57561));return r.queryTopObjectIds(n.default.from(e),t)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopExtents||!s?.query?.supportsTopFeaturesQuery)throw new p.A(Ae,"Layer source does not support queryTopExtents capability");const n=await i.e(7561).then(i.bind(i,57561));return r.queryTopExtents(n.default.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopCount||!s?.query?.supportsTopFeaturesQuery)throw new p.A(Ae,"Layer source does not support queryFeatureCount capability");const n=await i.e(7561).then(i.bind(i,57561));return r.queryTopCount(n.default.from(e),t)}read(e,t){const i=e.featureCollection;if((i||"Feature Collection"===e.type)&&(this.resourceInfo=e),i){const e=i.layers;e&&1===e.length&&(super.read(e[0],t),null!=i.showLegend&&super.read({showLegend:i.showLegend},t))}super.read(e,t),t&&"service"===t.origin&&(this.revert(["objectIdField","fields","timeInfo","dateFieldsTimeZone"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:i,layerContainerType:r,messages:s}=t;if(this.dynamicDataSource)return s?.push(De(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if(("web-map"===i||"web-scene"===i)&&"tables"!==r)return s?.push(De(this,`a table source can only be written to tables, not ${r}`)),null;if(this._hasMemorySource())return s?.push(De(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&("web-map"===i||"web-scene"===i)&&"tables"===r)return s?.push(De(this,"using a non-table source cannot be written to tables in web maps or web scenes")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new p.A(Ae,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||(0,_e.D)(this,e))}async save(e){return this._debouncedSaveOperations(Me.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Me.X.SAVE_AS,t,e)}_readEditingEnabled(e,t,i){let r=e.layerDefinition?.capabilities;return r?this._hasEditingCapability(r):(r=e.capabilities,t&&"web-map"===i?.origin&&!this._hasMemorySource()&&r?this._hasEditingCapability(r):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map((e=>e.trim())).includes("editing")}_writeEditingEnabled(e,t,i,r){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";(0,f.sM)("layerDefinition.capabilities",e,t),i&&!r?.writeLayerSchema&&(t.capabilities=e)}}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_fetchFirstValidLayerId(e){return(0,a.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then((e=>{const t=e.data;if(t)return this.findFirstValidLayerId(t)}))}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),(0,fe.yp)(this.renderer,this.fieldsIndex),(0,fe.sv)(this.timeInfo,this.fieldsIndex),this._hasMemorySource()&&"mesh"===this.geometryType&&(this.capabilities.query.supportsReturnMesh=!0),(0,Fe.L)(this,{origin:"service"})}async hasDataChanged(){return(0,pe.jp)(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach((e=>{const i=e.prototype?.attributes;i&&t&&delete i[t]}))}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new p.A("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new p.A("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach((e=>{e.layer=this,e.sourceLayer=this})),this.addHandles([e.on("after-add",(e=>{e.item.layer=this,e.item.sourceLayer=this})),e.on("after-remove",(e=>{e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}_resetMemorySource(e){e.forEach((e=>{e.layer=null,e.sourceLayer=null})),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}findFirstValidLayerId(e){return Array.isArray(e.layers)&&e.layers.length>0?e.layers[0].id:Array.isArray(e.tables)&&e.tables.length>0?e.tables[0].id:void 0}};(0,r._)([(0,_.MZ)(de.zQ)],Ce.prototype,"attributeTableTemplate",void 0),(0,r._)([(0,F.w)("service","capabilities")],Ce.prototype,"readCapabilities",null),(0,r._)([(0,_.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],Ce.prototype,"charts",void 0),(0,r._)([(0,_.MZ)({readOnly:!0})],Ce.prototype,"createQueryVersion",null),(0,r._)([(0,_.MZ)({json:{read:{source:"layerDefinition.copyrightText"}}})],Ce.prototype,"copyright",void 0),(0,r._)([(0,_.MZ)({json:{read:{source:"layerDefinition.displayField"}}})],Ce.prototype,"displayField",void 0),(0,r._)([(0,_.MZ)({types:l.Es,readOnly:!0})],Ce.prototype,"defaultSymbol",void 0),(0,r._)([(0,_.MZ)({type:ve.L})],Ce.prototype,"dynamicDataSource",void 0),(0,r._)([(0,_.MZ)({type:Boolean})],Ce.prototype,"editingEnabled",null),(0,r._)([(0,F.w)(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],Ce.prototype,"readEditingEnabled",null),(0,r._)([(0,F.w)("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],Ce.prototype,"readEditingEnabledFromWebMap",null),(0,r._)([(0,T.K)(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],Ce.prototype,"writeEditingEnabled",null),(0,r._)([(0,T.K)("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],Ce.prototype,"writeEditingEnabledToWebMap",null),(0,r._)([(0,_.MZ)({readOnly:!0})],Ce.prototype,"effectiveEditingEnabled",null),(0,r._)([(0,_.MZ)({...Oe.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:Ze}}}}})],Ce.prototype,"fields",void 0),(0,r._)([(0,_.MZ)(Oe.fieldsIndex)],Ce.prototype,"fieldsIndex",void 0),(0,r._)([(0,_.MZ)({type:M.A,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Ce.prototype,"formTemplate",void 0),(0,r._)([(0,_.MZ)({json:{read:{source:"layerDefinition.extent"}}})],Ce.prototype,"fullExtent",void 0),(0,r._)([(0,_.MZ)({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:Ze,writer(e,t,i){const r=e?pe.iX.toJSON(e):null;r&&(0,f.sM)(i,r,t)}}}},read:{source:"layerDefinition.geometryType",reader:pe.iX.read}}})],Ce.prototype,"geometryType",void 0),(0,r._)([(0,_.MZ)({json:{read:{source:"layerDefinition.hasM"}}})],Ce.prototype,"hasM",void 0),(0,r._)([(0,_.MZ)({json:{read:{source:"layerDefinition.hasZ"}}})],Ce.prototype,"hasZ",void 0),(0,r._)([(0,_.MZ)(de.id)],Ce.prototype,"id",void 0),(0,r._)([(0,_.MZ)({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Ce.prototype,"infoFor3D",void 0),(0,r._)([(0,_.MZ)({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],Ce.prototype,"isTable",void 0),(0,r._)([(0,F.w)("service","isTable",["type","geometryType"]),(0,F.w)("isTable",["layerDefinition.type","layerDefinition.geometryType"])],Ce.prototype,"readIsTable",null),(0,r._)([(0,T.K)("web-map","isTable")],Ce.prototype,"writeIsTable",null),(0,r._)([(0,_.MZ)(de.kF)],Ce.prototype,"labelsVisible",void 0),(0,r._)([(0,_.MZ)({type:[me.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:ge.w,write:!1},"web-scene":{name:"layerDefinition.drawingInfo.labelingInfo",read:ge.w,write:{enabled:!0,layerContainerTypes:I.K}}},name:"layerDefinition.drawingInfo.labelingInfo",read:ge.w,write:!0}})],Ce.prototype,"labelingInfo",void 0),(0,r._)([(0,_.MZ)((()=>{const e=(0,y.o8)(de.Ih);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,i){(0,f.sM)(i,(0,Ee.p)(e),t)}}},e})())],Ce.prototype,"opacity",void 0),(0,r._)([(0,_.MZ)(de.fV)],Ce.prototype,"legendEnabled",void 0),(0,r._)([(0,_.MZ)({type:["show","hide"],json:(()=>{const e=(0,y.o8)(de.C1.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],Ce.prototype,"listMode",void 0),(0,r._)([(0,F.w)("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],Ce.prototype,"readGlobalIdField",null),(0,r._)([(0,_.MZ)({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:Ze}}}}})],Ce.prototype,"objectIdField",void 0),(0,r._)([(0,F.w)("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],Ce.prototype,"readObjectIdField",null),(0,r._)([(0,_.MZ)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],Ce.prototype,"operationalLayerType",void 0),(0,r._)([(0,_.MZ)(Oe.outFields)],Ce.prototype,"outFields",void 0),(0,r._)([(0,_.MZ)({readOnly:!0})],Ce.prototype,"parsedUrl",null),(0,r._)([(0,_.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ce.prototype,"path",void 0),(0,r._)([(0,_.MZ)(de.M6)],Ce.prototype,"popupEnabled",void 0),(0,r._)([(0,_.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],Ce.prototype,"popupTemplate",void 0),(0,r._)([(0,_.MZ)({readOnly:!0})],Ce.prototype,"defaultPopupTemplate",null),(0,r._)([(0,_.MZ)({types:o.H,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:o.X,name:"layerDefinition.drawingInfo.renderer",write:{layerContainerTypes:I.K,overridePolicy:(e,t,i)=>({ignoreOrigin:i?.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,i)=>({ignoreOrigin:i?.writeLayerSchema})}}})],Ce.prototype,"renderer",null),(0,r._)([(0,F.w)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,F.w)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Ce.prototype,"readRenderer",null),(0,r._)([(0,_.MZ)()],Ce.prototype,"resourceInfo",void 0),(0,r._)([(0,_.MZ)((()=>{const e=(0,y.o8)(de.PY);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Ce.prototype,"screenSizePerspectiveEnabled",void 0),(0,r._)([(0,_.MZ)({clonable:!1})],Ce.prototype,"source",null),(0,r._)([(0,v.w)("source")],Ce.prototype,"castSource",null),(0,r._)([(0,F.w)("portal-item","source",["featureSet"]),(0,F.w)("web-map","source",["featureSet"])],Ce.prototype,"readSource",null),(0,r._)([(0,_.MZ)({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],Ce.prototype,"spatialReference",void 0),(0,r._)([(0,_.MZ)({type:Number})],Ce.prototype,"subtypeCode",void 0),(0,r._)([(0,_.MZ)({type:[ye.A]})],Ce.prototype,"templates",void 0),(0,r._)([(0,F.w)("templates",["editFieldsInfo","creatorField","editorField","templates"])],Ce.prototype,"readTemplates",null),(0,r._)([(0,_.MZ)({type:we.A})],Ce.prototype,"timeInfo",void 0),(0,r._)([(0,_.MZ)()],Ce.prototype,"title",void 0),(0,r._)([(0,F.w)("service","title",["name"]),(0,F.w)("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],Ce.prototype,"readTitle",null),(0,r._)([(0,F.w)("web-map","title",["layerDefinition.name","title"])],Ce.prototype,"readTitleFromWebMap",null),(0,r._)([(0,_.MZ)({type:String})],Ce.prototype,"sublayerTitleMode",void 0),(0,r._)([(0,_.MZ)({json:{read:!1}})],Ce.prototype,"type",void 0),(0,r._)([(0,_.MZ)({type:String})],Ce.prototype,"typeIdField",void 0),(0,r._)([(0,F.w)("service","typeIdField"),(0,F.w)("typeIdField",["layerDefinition.typeIdField"])],Ce.prototype,"readTypeIdField",null),(0,r._)([(0,_.MZ)({type:[ce.A]})],Ce.prototype,"types",void 0),(0,r._)([(0,F.w)("service","types",["types"]),(0,F.w)("types",["layerDefinition.types"])],Ce.prototype,"readTypes",null),(0,r._)([(0,_.MZ)({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],Ce.prototype,"visible",void 0),(0,r._)([(0,F.w)("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Ce.prototype,"readVisible",null),Ce=(0,r._)([(0,S.$)("esri.layers.FeatureLayer")],Ce);const je=Ce},8947:(e,t,i)=>{i.d(t,{L:()=>o});var r=i(60999),s=i(74887),n=i(67076);async function o(e,t,i){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const a=await(0,r.Ke)(o.populateFromStyle());if((0,s.Te)(i),!1===a.ok){const i=a.error;t?.messages&&t.messages.push(new n.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${i.message}`,{error:i,context:t})),e.clear("renderer",t?.origin)}}}},96520:(e,t,i)=>{i.d(t,{u:()=>o});var r=i(83047),s=i(21325);function n(e,t,i){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=i)}function o(e,t,i){if(!e&&!t||!i)return;const s=(0,r.G9)(i);a(e,i,s),a(t,i,s)}function a(e,t,i){if(e)for(const r of e)l(r.geometry,t,i)}function l(e,t,i){if(!e?.spatialReference||(0,s.aI)(e.spatialReference,t))return;const o=(0,r.G9)(e.spatialReference)/i;if(1!==o)if("x"in e)null!=e.z&&(e.z*=o);else if("rings"in e)n(e,e.rings,o);else if("paths"in e)n(e,e.paths,o);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=o)}},35093:(e,t,i)=>{i.d(t,{Q:()=>r});const r=1/255.5}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2018,7159],{83116:(e,t,r)=>{r.r(t),r.d(t,{default:()=>P});var s=r(90237),a=r(78888),n=r(5503),o=r(62885),i=r(25482),l=r(4718),c=r(92474),u=r(81583),p=r(53966),d=r(97768),h=r(74887),y=r(84952),f=r(10107),m=(r(44208),r(40608)),g=r(43937),b=r(16930),w=r(20655),v=r(80812),L=r(43281),_=r(69622),I=(r(87811),r(73444));const S=new Set(["ar","bs","ca","hr","cs","da","nl","en","et","fi","fr","de","el","he","hu","id","it","ja","ko","lv","lt","nb","pl","ro","ru","sr","es","sv","th","tr","uk","vi"]);let M=class extends _.A{constructor(e){super(e),this.apiKey=null,this.id=null,this.language=null,this.places=null,this.serviceUrl="https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/webmaps",this.worldview=null}getLanguageParamValue(){if(this.language)return this.language;const e=(0,I.JK)().toLowerCase();switch(e){case"pt-br":return"pt-BR";case"pt-pt":return"pt-PT";case"zh-cn":return"zh-CN";case"zh-hk":return"zh-HK";case"zh-tw":return"zh-TW"}const t=(0,I.Z0)(e);return"pt"===t?"pt-BR":t&&S.has(t)?t:"global"}};(0,s._)([(0,f.MZ)()],M.prototype,"apiKey",void 0),(0,s._)([(0,f.MZ)()],M.prototype,"id",void 0),(0,s._)([(0,f.MZ)()],M.prototype,"language",void 0),(0,s._)([(0,f.MZ)()],M.prototype,"places",void 0),(0,s._)([(0,f.MZ)()],M.prototype,"serviceUrl",void 0),(0,s._)([(0,f.MZ)()],M.prototype,"worldview",void 0),M=(0,s._)([(0,m.$)("esri.support.BasemapStyle")],M);const A=M;var x,C=r(751);let U=0,R=x=class extends(i.A.JSONSupportMixin(c.A)){constructor(e){super(e),this.id=null,this.portalItem=null,this.spatialReference=null,this.style=null,this.thumbnailUrl=null,this.title="Basemap",this.id=Date.now().toString(16)+"-basemap-"+U++,this.baseLayers=new n.A,this.referenceLayers=new n.A;const t=e=>{e.parent&&e.parent!==this&&"remove"in e.parent&&e.parent.remove(e),e.parent=this,"elevation"===e.type&&p.A.getLogger(this).error(`Layer '${e.title}, id:${e.id}' of type '${e.type}' is not supported as a basemap layer and will therefore be ignored.`)},r=e=>{e.parent=null};this.addHandles([this.baseLayers.on("after-add",(e=>t(e.item))),this.referenceLayers.on("after-add",(e=>t(e.item))),this.baseLayers.on("after-remove",(e=>r(e.item))),this.referenceLayers.on("after-remove",(e=>r(e.item)))])}initialize(){this.when().catch((e=>{p.A.getLogger(this).error("#load()",`Failed to load basemap (title: '${this.title}', id: '${this.id}')`,e)})),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}destroy(){const e=this.baseLayers.toArray();for(const t of e)t.destroy();const t=this.referenceLayers.toArray();for(const e of t)e.destroy();this.baseLayers.destroy(),this.referenceLayers.destroy(),this.portalItem=(0,d.pR)(this.portalItem)}normalizeCtorArgs(e){return e&&"resourceInfo"in e&&(this._set("resourceInfo",e.resourceInfo),delete(e={...e}).resourceInfo),e}set baseLayers(e){this._set("baseLayers",(0,o.V)(e,this._get("baseLayers")))}_writeBaseLayers(e,t,r){const s=[];e?(r={...r,layerContainerType:"basemap"},this.baseLayers.forEach((e=>{const t=(0,C.CJ)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);null!=t&&s.push(t)})),this.referenceLayers.forEach((e=>{const t=(0,C.CJ)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);null!=t&&("scene"!==e.type&&(t.isReference=!0),s.push(t))})),t.baseMapLayers=s):t.baseMapLayers=s}set referenceLayers(e){this._set("referenceLayers",(0,o.V)(e,this._get("referenceLayers")))}writeTitle(e,t){t.title=e||"Basemap"}load(e){return this.addResolvingPromise(this._loadFromSource(e)),Promise.resolve(this)}loadAll(){return(0,u.g)(this,(e=>{e(this.baseLayers,this.referenceLayers)}))}clone(){const e={id:this.id,title:this.title,portalItem:this.portalItem,baseLayers:this.baseLayers.map((e=>(0,l.Nb)(e)?e.clone():e)),referenceLayers:this.referenceLayers.map((e=>(0,l.Nb)(e)?e.clone():e))};return this.loaded&&(e.loadStatus="loaded"),new x({resourceInfo:this.resourceInfo}).set(e)}read(e,t){this.resourceInfo||this._set("resourceInfo",{data:e,context:t}),super.read(e,t)}write(e,t){return e=e||{},t?.origin||(t={origin:"web-map",...t}),super.write(e,t),!this.loaded&&this.resourceInfo?.data.baseMapLayers&&(e.baseMapLayers=this.resourceInfo.data.baseMapLayers.map((e=>{const t=(0,l.o8)(e);return t.url&&(0,y.BQ)(t.url)&&(t.url=`https:${t.url}`),t.templateUrl&&(0,y.BQ)(t.templateUrl)&&(t.templateUrl=`https:${t.templateUrl}`),t}))),e}async _loadFromSource(e){const{resourceInfo:t,portalItem:r,style:s}=this;(0,h.Te)(e);const a=[];if(t){const r=t.context?t.context.url:null;if(a.push(this._loadLayersFromJSON(t.data,r,e)),t.data.id&&!t.data.title){const e=t.data.id;a.push((0,L.q)(e).then((e=>{e&&this.read({title:e},t.context)})))}}else r?a.push(this._loadFromItem(r,e)):s&&a.push(this._loadFromStylesService(s,e));await Promise.all(a)}async _loadLayersFromJSON(e,t,s){const a=this.resourceInfo?.context,n=this.portalItem?.portal||a?.portal||null,o=O[a?.origin||""]??"web-map",{populateOperationalLayers:i}=await Promise.all([r.e(7251),r.e(5356)]).then(r.bind(r,75356)),l=[];if((0,h.Te)(s),e.baseMapLayers&&Array.isArray(e.baseMapLayers)){const r={context:{...a,origin:o,url:t,portal:n,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},s=e=>"web-scene"===o&&"ArcGISSceneServiceLayer"===e.layerType||e.isReference,c=i(this.baseLayers,e.baseMapLayers.filter((e=>!s(e))),r);l.push(c);const u=i(this.referenceLayers,e.baseMapLayers.filter(s),r);l.push(u)}await Promise.allSettled(l)}async _loadFromItem(e,t){const r=await e.load(t),s=await r.fetchData("json",t),a=(0,y.An)(e.itemUrl??"");return this._set("resourceInfo",{data:s.baseMap??{},context:{origin:k[e.type||""]??"web-map",portal:e.portal||w.A.getDefault(),url:a}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:s.spatialReference},this.resourceInfo.context),this.read({title:e.title,thumbnailUrl:e.thumbnailUrl},{origin:"portal-item",portal:e.portal||w.A.getDefault(),url:a}),this._loadLayersFromJSON(this.resourceInfo.data,a,t)}async _loadFromStylesService(e,t){const r=`${e.serviceUrl}/${e.id}`,s=(await(0,a.A)(r,{query:{language:e.getLanguageParamValue(),places:e.places,worldview:e.worldview,token:e.apiKey},signal:t?.signal})).data,n=(0,y.An)(r);if(this._set("resourceInfo",{data:s.baseMap??{},context:{origin:"web-map",url:n}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:s.spatialReference},this.resourceInfo.context),await this._loadLayersFromJSON(this.resourceInfo.data,n,t),e.apiKey)for(const t of[...this.baseLayers,...this.referenceLayers])"apiKey"in t&&(t.apiKey=e.apiKey)}static fromId(e){const t=L.H[e];return t?t.itemId?new x({portalItem:{id:t.itemId,portal:{url:"https://www.arcgis.com"}}}):x.fromJSON(t,{origin:t.is3d?"web-scene":"web-map"}):null}};(0,s._)([(0,f.MZ)({json:{write:{ignoreOrigin:!0,target:"baseMapLayers",writer(e,t,r,s){this._writeBaseLayers(e,t,s)}},origins:{"web-scene":{write:{ignoreOrigin:!0,target:{baseMapLayers:{type:n.A}},writer(e,t,r,s){this._writeBaseLayers(e,t,s)}}}}}})],R.prototype,"baseLayers",null),(0,s._)([(0,f.MZ)({type:String,json:{origins:{"web-scene":{write:!0}}}})],R.prototype,"id",void 0),(0,s._)([(0,f.MZ)({type:v.default})],R.prototype,"portalItem",void 0),(0,s._)([(0,f.MZ)()],R.prototype,"referenceLayers",null),(0,s._)([(0,f.MZ)({readOnly:!0})],R.prototype,"resourceInfo",void 0),(0,s._)([(0,f.MZ)({type:b.A})],R.prototype,"spatialReference",void 0),(0,s._)([(0,f.MZ)({type:A})],R.prototype,"style",void 0),(0,s._)([(0,f.MZ)()],R.prototype,"thumbnailUrl",void 0),(0,s._)([(0,f.MZ)({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],R.prototype,"title",void 0),(0,s._)([(0,g.K)("title")],R.prototype,"writeTitle",null),R=x=(0,s._)([(0,m.$)("esri.Basemap")],R);const k={"Web Scene":"web-scene","Web Map":"web-map","Link Chart":"link-chart"},O={"web-scene":"web-scene","web-map":"web-map","link-chart":"link-chart"},P=R},97159:(e,t,r)=>{r.d(t,{M:()=>b,a:()=>m,b:()=>v,e:()=>y,f:()=>o,i:()=>d,p:()=>h,r:()=>l,t:()=>i,w:()=>c});var s=r(70333),a=r(84952),n=r(39131);function o(e,t){const r=t?.url?.path;if(e&&r&&(e=(0,a.s2)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,a.V1)(e,t.portalItem.itemUrl);null!=r&&p.test(r)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return(e=f(e,t?.portal))&&u.test(e)?m(e):e}function i(e,t,r=b.YES){if(null==(e=e&&u.test(e)?g(e):e))return e;!(0,a.oP)(e)&&t?.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let s=(0,a.s2)(e);if(t){const r=t.verifyItemRelativeUrls?.rootPath||t.url?.path;if(r){const n=f(r,t.portal),o=f(s,t.portal);s=(0,a.V1)(o,n,n),null!=s&&s!==o&&s!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=y(s,t?.portal),(0,a.oP)(s)&&(s=(0,a.S8)(s)),t?.resources&&t?.portalItem&&!(0,a.oP)(s)&&!(0,a.DB)(s)&&r===b.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(s),compress:!1}),s}function l(e,t,r){return o(e,r)}function c(e,t,r,s){const a=i(e,s);void 0!==a&&(t[r]=a)}const u=/\/items\/([^/]+)\/resources\/(.*)/,p=/^\.\/resources\//;function d(e){const t=e?.match(u)??null;return t?.[1]??null}function h(e){const t=e?.match(u)??null;if(null==t)return null;const r=t[2],s=r.lastIndexOf("/");if(-1===s){const{path:e,extension:t}=(0,a.xw)(r);return{prefix:null,filename:e,extension:t}}const{path:n,extension:o}=(0,a.xw)(r.slice(s+1));return{prefix:r.slice(0,s),filename:n,extension:o}}function y(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,a.T1)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function f(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,s=(0,a.Xq)();return(0,a.FX)(s,`${s.scheme}://${r}`)?(0,a.T1)(e,t.portalHostname,r):(0,a.T1)(e,r,t.portalHostname)}function m(e){if(!e)return e||null;let t=e;return t&&s.id&&!s.id.findCredential(t)&&(t=(0,n.qG)(t),t=t.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),t=t.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),t=t.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),t}function g(e){if(!e)return e||null;let t=e;return t=t.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),t=t.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),t=t.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),t&&s.id&&!s.id.findCredential(t)&&(t=(0,n.qG)(t)),t}var b,w;(w=b||(b={}))[w.YES=0]="YES",w[w.NO=1]="NO";const v=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return b},ensureMainOnlineDomain:y,fromCDNUrl:g,fromJSON:o,itemIdFromResourceUrl:d,prefixAndFilenameFromResourceUrl:h,read:l,toCDNUrl:m,toJSON:i,write:c},Symbol.toStringTag,{value:"Module"}))},60999:(e,t,r)=>{r.d(t,{DZ:()=>y,Ke:()=>h,Tj:()=>u,UT:()=>f,jJ:()=>c});var s=r(90237),a=r(69622),n=r(97768),o=r(74887),i=r(10107),l=r(40608);function c(e,t,r){return(0,o.Lx)(e.map(((e,s)=>t.apply(r,[e,s]))))}async function u(e,t,r){return(await(0,o.Lx)(e.map(((e,s)=>t.apply(r,[e,s]))))).map((e=>e.value))}function p(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function h(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return p(await e)}catch(e){return d(e)}}async function y(e){try{return p(await e)}catch(e){return(0,o.QP)(e),d(e)}}function f(e,t){return new m(e,t)}let m=class extends a.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then((e=>{this._result=p(e),this._cleanup()}),(e=>{this._result=d(e),this._cleanup()})),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,s._)([(0,i.MZ)()],m.prototype,"value",null),(0,s._)([(0,i.MZ)()],m.prototype,"error",null),(0,s._)([(0,i.MZ)()],m.prototype,"finished",null),(0,s._)([(0,i.MZ)()],m.prototype,"promise",void 0),(0,s._)([(0,i.MZ)()],m.prototype,"_result",void 0),m=(0,s._)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m)},62885:(e,t,r)=>{r.d(t,{H:()=>n,V:()=>a});var s=r(5503);function a(e,t,r=s.A){return t||(t=new r),t===e||(t.removeAll(),(a=e)&&(Array.isArray(a)||"items"in a&&Array.isArray(a.items))?t.addMany(e):e&&t.add(e)),t;var a}function n(e){return e}},81583:(e,t,r)=>{r.d(t,{L:()=>i,g:()=>o});var s=r(60999),a=r(5503),n=r(92474);async function o(e,t){return await e.load(),i(e,t)}async function i(e,t){const r=[],o=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?o(...t):a.A.isCollection(t)?t.forEach((e=>o(e))):n.A.isLoadable(t)&&r.push(t))};t(o);let i=null;if(await(0,s.Tj)(r,(async e=>{const t=await(0,s.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||i||(i=t)})),i)throw i.error;return e}},83531:(e,t,r)=>{r.d(t,{BR:()=>u,Ov:()=>i,TU:()=>o,W_:()=>l,XX:()=>n,tk:()=>p,wI:()=>c});var s=r(70333),a=r(78888);const n={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function i(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function c(e,t){const r=s.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const n=e.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const o=`${e.slice(0,n)}/rest/info`,i=null!=t?t.signal:null,{data:l}=await(0,a.A)(o,{query:{f:"json"},responseType:"json",signal:i});return l?.owningSystemUrl||null}function u(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function p(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}},751:(e,t,r)=>{r.d(t,{CJ:()=>d});var s=r(49186),a=r(4718),n=r(93637),o=r(67124),i=r(83531);const l=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wcs","wms","wmts"]),c=new Set(["catalog","csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","knowledge-graph","map-image","map-notes","media","ogc-feature","oriented-imagery","route","stream","subtype-group","tile","unknown","unsupported","vector-tile","web-tile","wcs","wfs","wms","wmts"]);function u(e,t){if(t.restrictedWebMapWriting){const r=function(e){return"basemap"===e.layerContainerType?l:"operational-layers"===e.layerContainerType?c:null}(t);return null==r||r.has(e.type)&&!(0,i.Ov)(e)}return!0}function p(e,t){"maxScale"in e&&(t.maxScale=(0,o.B)(e.maxScale)??void 0),"minScale"in e&&(t.minScale=(0,o.B)(e.minScale)??void 0)}function d(e,t,r){if(!e.persistenceEnabled)return null;if(!("write"in e)||!e.write)return r?.messages&&r.messages.push(new s.A("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if((0,i.Ov)(e)&&!e.isTable)t=e.resourceInfo;else if(u(e,r)){const t={};return e.write(t,r)?t:null}return null!=t&&function(e,t){if(function(e,t){if(t)if((0,i.Ov)(e)){const r=(0,n.wc)("featureCollection.layers",t),s=r?.[0]?.layerDefinition;s&&p(e,s)}else"group"!==e.type&&p(e,t)}(e,t),t&&(t.id=e.id,"blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,o.B)(e.opacity)??void 0,t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type))if((0,i.Ov)(e)){const r=t.featureCollection;r&&(r.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,a.o8)(t)),t}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2626],{35982:(e,t,r)=>{r.d(t,{B:()=>c});var i=r(4576),s=r(36563),a=r(53966),o=r(74887),n=r(29953);class c{constructor(e,t,r,i,s={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._promise=(0,n.ho)(e,{...s,schedule:i}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>a.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,s.hA)((()=>{r.removed=!0,(0,i.TF)(this._listeners,r),this._thread&&null!=r.threadHandle&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const i=this._transferLists[e],s=i?i(t):[];return this._thread.invoke(e,t,{transferList:s,signal:r})}return this._promise?this._promise.then((()=>((0,o.Te)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}},36421:(e,t,r)=>{var i;r.d(t,{p:()=>i}),function(e){e[e.Texture=0]="Texture",e[e.RenderBuffer=1]="RenderBuffer"}(i||(i={}))},72626:(e,t,r)=>{r.d(t,{g:()=>l});var i=r(49186),s=(r(44208),r(44794));(r(53966),r(36708),r(35982)).B;new Set;var a=r(94656),o=r(63907),n=r(36421),c=r(67171);class h extends c.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case o.H0.R16F:case o.H0.R16I:case o.H0.R16UI:case o.H0.R32F:case o.H0.R32I:case o.H0.R32UI:case o.H0.R8_SNORM:case o.H0.R8:case o.H0.R8I:case o.H0.R8UI:this.pixelFormat=o.Ab.RED}}static validate(e,t){return new h(e,t)}}let l=class e{constructor(e,t=null,r=null){if(this.type=n.p.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,this._isCompressing=(0,s.v)(!1),"context"in e)this._descriptor=e,r=t;else{const r=h.validate(e,t);if(!r)throw new i.A("Texture descriptor invalid");this._descriptor=r}this._compressionWorkerAbortController=new AbortController,this._descriptor.target===o.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,c.e)(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}get isCompressing(){return this._isCompressing.value}dispose(){this._compressionWorkerAbortController.abort(),this._glName&&this._descriptor.context.instanceCounter.decrement(o.vt.Texture,this),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===o.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.shouldCompress=e}_setDataCubeMap(e=null){for(let t=o.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=o.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}setData(e){return this.isCompressing&&(this._isCompressing.value=!1,this._compressionWorkerAbortController.abort()),!u(e)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in o.CQ&&(this._descriptor.internalFormat=void 0),this._setData(e),this.isCompressing}compressOnWorker(e){const t=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_etc"),r=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_s3tc"),i=null,s=function(e,t=!1){const r=document.createElement("canvas"),i=r.getContext("2d");return r.width=e.width,r.height=e.height,t&&(i.translate(0,r.height),i.scale(1,-1)),i.drawImage(e,0,0),i.getImageData(0,0,r.width,r.height).data}(e,this.descriptor.flipped);if(i&&(t||r)){this._isCompressing.value=!0;const a={data:s,width:e.width,height:e.height,hasMipmap:this._descriptor.hasMipmap,hasETC:!!t,hasS3TC:!!r,buffer:[new ArrayBuffer(0)]};i.invoke(a,this._compressionWorkerAbortController.signal).then((e=>{this._descriptor.internalFormat=e.internalFormat,this._setData(e.compressedTexture),this._isCompressing.value=!1})).catch((()=>{this._isCompressing.value=!1}))}}_setData(t,r){const s=this._descriptor.context?.gl;if(!s)return;(0,a.Y2)(s),this._glName||(this._glName=s.createTexture(),this._glName&&this._descriptor.context.instanceCounter.increment(o.vt.Texture,this));const n=this._descriptor,c=r??n.target,h=E(c),l=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),_(n),this._configurePixelStorage(),(0,a.Y2)(s);const T=this._deriveInternalFormat();if(m(t)){let e="width"in t?t.width:t.codedWidth,r="height"in t?t.height:t.codedHeight;const i=1;t instanceof HTMLVideoElement&&(e=t.videoWidth,r=t.videoHeight),n.width&&n.height,h&&n.depth,n.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,T,n.hasMipmap,e,r,i),this._texImage(c,0,T,e,r,i,t),(0,a.Y2)(s),n.hasMipmap&&(this.generateMipmap(),(0,a.Y2)(s)),n.width||(n.width=e),n.height||(n.height=r),h&&!n.depth&&(n.depth=i)}else{const{width:e,height:r,depth:l}=n;if(null==e||null==r)throw new i.A("Width and height must be specified!");if(h&&null==l)throw new i.A("Depth must be specified!");if(n.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,T,n.hasMipmap,e,r,l),u(t)){const a=t.levels,h=A(c,e,r,l),_=Math.min(h,a.length)-1;s.texParameteri(n.target,this._descriptor.context.gl.TEXTURE_MAX_LEVEL,_);const d=T;if(!(d in o.CQ))throw new i.A("Attempting to use compressed data with an uncompressed format!");this._forEachMipmapLevel(((e,t,r,i)=>{const s=a[Math.min(e,a.length-1)];this._compressedTexImage(c,e,d,t,r,i,s)}),_)}else this._texImage(c,0,T,e,r,l,t),(0,a.Y2)(s),n.hasMipmap&&this.generateMipmap()}d(s,this._descriptor),p(s,this._descriptor),function(e,t){const r=e.capabilities.textureFilterAnisotropic;r&&e.gl.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY,t.maxAnisotropy??1)}(this._descriptor.context,this._descriptor),(0,a.Y2)(s),this._descriptor.context.bindTexture(l,e.TEXTURE_UNIT_FOR_UPDATES)}updateData(t,r,s,a,o,n,c=0){n||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const h=this._descriptor,l=this._deriveInternalFormat(),{context:_,pixelFormat:d,dataType:p,target:E,isImmutable:A}=h;if(A&&!this._wasImmutablyAllocated)throw new i.A("Cannot update immutable texture before allocation!");const T=_.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||s<0||r+a>h.width||s+o>h.height)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:R}=_;c&&R.pixelStorei(R.UNPACK_SKIP_ROWS,c),m(n)?R.texSubImage2D(E,t,r,s,a,o,d,p,n):u(n)?R.compressedTexSubImage2D(E,t,r,s,a,o,l,n.levels[t]):R.texSubImage2D(E,t,r,s,a,o,d,p,n),c&&R.pixelStorei(R.UNPACK_SKIP_ROWS,0),_.bindTexture(T,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,s,a,o,n,c,h){h||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const l=this._descriptor,_=this._deriveInternalFormat(),{context:d,pixelFormat:p,dataType:m,isImmutable:A,target:T}=l;if(A&&!this._wasImmutablyAllocated)throw new i.A("Cannot update immutable texture before allocation!");E(T)||console.warn("Attempting to set 3D texture data on a non-3D texture");const R=d.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);d.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||s<0||a<0||r+o>l.width||s+n>l.height||a+c>l.depth)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:g}=d;if(u(h))h=h.levels[t],g.compressedTexSubImage3D(T,t,r,s,a,o,n,c,_,h);else{const e=h;g.texSubImage3D(T,t,r,s,a,o,n,c,p,m,e)}d.bindTexture(R,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,_(t)}t.samplingMode===o.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=o.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===o.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=o.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,_(e)}e.samplingMode===o.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=o.Cj.LINEAR):e.samplingMode===o.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=o.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,_(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){const e=this._descriptor,t=e.context.gl;this._samplingModeDirty&&(d(t,e),this._samplingModeDirty=!1),this._wrapModeDirty&&(p(t,e),this._wrapModeDirty=!1)}_deriveInternalFormat(){if(null!=this._descriptor.internalFormat)return this._descriptor.internalFormat===o.Ab.DEPTH_STENCIL&&(this._descriptor.internalFormat=o.Ab.DEPTH24_STENCIL8),this._descriptor.internalFormat;switch(this._descriptor.dataType){case o.ld.FLOAT:switch(this._descriptor.pixelFormat){case o.Ab.RGBA:return this._descriptor.internalFormat=o.H0.RGBA32F;case o.Ab.RGB:return this._descriptor.internalFormat=o.H0.RGB32F;default:throw new i.A("Unable to derive format")}case o.ld.UNSIGNED_BYTE:switch(this._descriptor.pixelFormat){case o.Ab.RGBA:return this._descriptor.internalFormat=o.H0.RGBA8;case o.Ab.RGB:return this._descriptor.internalFormat=o.H0.RGB8}}return this._descriptor.internalFormat=this._descriptor.pixelFormat===o.Ab.DEPTH_STENCIL?o.Ab.DEPTH24_STENCIL8:this._descriptor.pixelFormat}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_texStorage(e,t,r,s,a,n){const{gl:c}=this._descriptor.context;if(!(t in o.H0))throw new i.A("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const h=r?A(e,s,a,n):1;if(E(e)){if(null==n)throw new i.A("Missing depth dimension for 3D texture upload");c.texStorage3D(e,h,t,s,a,n)}else c.texStorage2D(e,h,t,s,a);this._wasImmutablyAllocated=!0}_texImage(e,t,r,s,a,o,n){const c=this._descriptor.context.gl,h=E(e),{isImmutable:l,pixelFormat:_,dataType:d}=this._descriptor;if(l){if(null!=n){const r=n;if(h){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.texSubImage3D(e,t,0,0,0,s,a,o,_,d,r)}else c.texSubImage2D(e,t,0,0,s,a,_,d,r)}}else{const l=n;if(h){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.texImage3D(e,t,r,s,a,o,0,_,d,l)}else c.texImage2D(e,t,r,s,a,0,_,d,l)}}_compressedTexImage(e,t,r,s,a,o,n){const c=this._descriptor.context.gl,h=E(e);if(this._descriptor.isImmutable){if(null!=n)if(h){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.compressedTexSubImage3D(e,t,0,0,0,s,a,o,r,n)}else c.compressedTexSubImage2D(e,t,0,0,s,a,r,n)}else if(h){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.compressedTexImage3D(e,t,r,s,a,o,0,n)}else c.compressedTexImage2D(e,t,r,s,a,0,n)}_forEachMipmapLevel(e,t=1/0){let{width:r,height:s,depth:a,hasMipmap:n,target:c}=this._descriptor;const h=c===o.Ap.TEXTURE_3D;if(null==r||null==s||h&&null==a)throw new i.A("Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,s,a),n&&(1!==r||1!==s||h&&1!==a)&&!(i>=t);++i)r=Math.max(1,r>>1),s=Math.max(1,s>>1),h&&(a=Math.max(1,a>>1))}};function _(e){(null!=e.width&&e.width<0||null!=e.height&&e.height<0||null!=e.depth&&e.depth<0)&&console.error("Negative dimension parameters are not allowed!")}function d(e,t){let r=t.samplingMode,i=t.samplingMode;r===o.Cj.LINEAR_MIPMAP_NEAREST||r===o.Cj.LINEAR_MIPMAP_LINEAR?(r=o.Cj.LINEAR,t.hasMipmap||(i=o.Cj.LINEAR)):r!==o.Cj.NEAREST_MIPMAP_NEAREST&&r!==o.Cj.NEAREST_MIPMAP_LINEAR||(r=o.Cj.NEAREST,t.hasMipmap||(i=o.Cj.NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,r),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,i)}function p(e,t){"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}function u(e){return null!=e&&"type"in e&&"compressed"===e.type}function m(e){return null!=e&&!u(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function E(e){return e===o.Ap.TEXTURE_3D||e===o.Ap.TEXTURE_2D_ARRAY}function A(e,t,r,i=1){let s=Math.max(t,r);return e===o.Ap.TEXTURE_3D&&(s=Math.max(s,i)),Math.floor(Math.log2(s))+1}l.TEXTURE_UNIT_FOR_UPDATES=0},67171:(e,t,r)=>{r.d(t,{R:()=>a,e:()=>o});var i=r(63907),s=r(42293);class a{constructor(e=0,t=e){this.width=e,this.height=t,this.target=i.Ap.TEXTURE_2D,this.pixelFormat=i.Ab.RGBA,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=i.Cj.LINEAR,this.wrapMode=i.pF.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.shouldCompress=!1,this.depth=1,this.isImmutable=!1}}function o(e){return e.width<=0||e.height<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,s.IB)(e.internalFormat))*(e.target===i.Ap.TEXTURE_CUBE_MAP?6:1))}},42293:(e,t,r)=>{r.d(t,{Hi:()=>c,IB:()=>h,yu:()=>n}),r(44208);var i=r(94656),s=r(63907),a=r(62298);function o(e){const t=e.gl;switch(t.getError()){case t.NO_ERROR:return null;case t.INVALID_ENUM:return"An unacceptable value has been specified for an enumerated argument";case t.INVALID_VALUE:return"An unacceptable value has been specified for an argument";case t.INVALID_OPERATION:return"The specified command is not allowed for the current state";case t.INVALID_FRAMEBUFFER_OPERATION:return"The currently bound framebuffer is not framebuffer complete";case t.OUT_OF_MEMORY:return"Not enough memory is left to execute the command";case t.CONTEXT_LOST_WEBGL:return"WebGL context is lost"}return"Unknown error"}function n(e,t,r,s,n=0){const c=e.gl;e.bindBuffer(r);for(const r of s){const s=t.get(r.name);if(null==s){console.warn(`There is no location for vertex attribute '${r.name}' defined.`);continue}const h=n*r.stride;if(r.count<=4)c.vertexAttribPointer(s,r.count,r.type,r.normalized,r.stride,r.offset+h),c.enableVertexAttribArray(s),r.divisor>0&&e.gl.vertexAttribDivisor(s,r.divisor);else if(9===r.count)for(let t=0;t<3;t++)c.vertexAttribPointer(s+t,3,r.type,r.normalized,r.stride,r.offset+12*t+h),c.enableVertexAttribArray(s+t),r.divisor>0&&e.gl.vertexAttribDivisor(s+t,r.divisor);else if(16===r.count)for(let t=0;t<4;t++)c.vertexAttribPointer(s+t,4,r.type,r.normalized,r.stride,r.offset+16*t+h),c.enableVertexAttribArray(s+t),r.divisor>0&&e.gl?.vertexAttribDivisor(s+t,r.divisor);else console.error("Unsupported vertex attribute element count: "+r.count);if((0,i.en)()){const t=o(e),i=(0,a._)(r.type),s=r.offset,n=Math.round(i/s)!==i/s?`. Offset not a multiple of stride. DataType requires ${i} bytes, but descriptor has an offset of ${s}`:"";t&&console.error(`Unable to bind vertex attribute "${r.name}" with baseInstanceOffset ${h}${n}:`,t,r)}}}function c(e,t,r,i){const a=e.gl;e.bindBuffer(r);for(const r of i){const i=t.get(r.name);if(r.count<=4)a.disableVertexAttribArray(i),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(i,0);else if(9===r.count)for(let t=0;t<3;t++)a.disableVertexAttribArray(i+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(i+t,0);else if(16===r.count)for(let t=0;t<4;t++)a.disableVertexAttribArray(i+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(i+t,0);else console.error("Unsupported vertex attribute element count: "+r.count)}e.unbindBuffer(s.NZ.ARRAY_BUFFER)}function h(e){switch(e){case s.Ab.ALPHA:case s.Ab.LUMINANCE:case s.Ab.RED:case s.Ab.RED_INTEGER:case s.H0.R8:case s.H0.R8I:case s.H0.R8UI:case s.H0.R8_SNORM:case s.yQ.STENCIL_INDEX8:return 1;case s.Ab.LUMINANCE_ALPHA:case s.Ab.RG:case s.Ab.RG_INTEGER:case s.H0.RGBA4:case s.H0.R16F:case s.H0.R16I:case s.H0.R16UI:case s.H0.RG8:case s.H0.RG8I:case s.H0.RG8UI:case s.H0.RG8_SNORM:case s.H0.RGB565:case s.H0.RGB5_A1:case s.yQ.DEPTH_COMPONENT16:return 2;case s.Ab.DEPTH_COMPONENT:case s.Ab.RGB:case s.Ab.RGB_INTEGER:case s.H0.RGB8:case s.H0.RGB8I:case s.H0.RGB8UI:case s.H0.RGB8_SNORM:case s.H0.SRGB8:case s.yQ.DEPTH_COMPONENT24:return 3;case s.Ab.DEPTH_STENCIL:case s.Ab.DEPTH24_STENCIL8:case s.Ab.RGBA:case s.Ab.RGBA_INTEGER:case s.H0.RGBA8:case s.H0.R32F:case s.H0.R11F_G11F_B10F:case s.H0.RG16F:case s.H0.R32I:case s.H0.R32UI:case s.H0.RG16I:case s.H0.RG16UI:case s.H0.RGBA8I:case s.H0.RGBA8UI:case s.H0.RGBA8_SNORM:case s.H0.SRGB8_ALPHA8:case s.H0.RGB9_E5:case s.H0.RGB10_A2UI:case s.H0.RGB10_A2:case s.yQ.DEPTH_STENCIL:case s.yQ.DEPTH_COMPONENT32F:case s.yQ.DEPTH24_STENCIL8:return 4;case s.yQ.DEPTH32F_STENCIL8:return 5;case s.H0.RGB16F:case s.H0.RGB16I:case s.H0.RGB16UI:return 6;case s.H0.RG32F:case s.H0.RG32I:case s.H0.RG32UI:case s.H0.RGBA16F:case s.H0.RGBA16I:case s.H0.RGBA16UI:return 8;case s.H0.RGB32F:case s.H0.RGB32I:case s.H0.RGB32UI:return 12;case s.H0.RGBA32F:case s.H0.RGBA32I:case s.H0.RGBA32UI:return 16;case s.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case s.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case s.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case s.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case s.CQ.COMPRESSED_R11_EAC:case s.CQ.COMPRESSED_SIGNED_R11_EAC:case s.CQ.COMPRESSED_RGB8_ETC2:case s.CQ.COMPRESSED_SRGB8_ETC2:case s.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case s.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case s.CQ.COMPRESSED_RG11_EAC:case s.CQ.COMPRESSED_SIGNED_RG11_EAC:case s.CQ.COMPRESSED_RGBA8_ETC2_EAC:case s.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},94656:(e,t,r)=>{r.d(t,{Xc:()=>h,Y2:()=>l,en:()=>c});var i=r(49186),s=r(44208),a=r(53966);const o=()=>a.A.getLogger("esri.views.webgl.checkWebGLError"),n=!!(0,s.A)("enable-feature:webgl-debug");function c(){return n}function h(){return n}function l(e){if(c()){const t=e.getError();if(t){const r=function(e,t){switch(t){case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e,t),s=(new Error).stack;o().error(new i.A("webgl-error","WebGL error occurred",{message:r,stack:s}))}}}},62298:(e,t,r)=>{r.d(t,{_:()=>s});var i=r(63907);function s(e){switch(e){case i.pe.BYTE:case i.pe.UNSIGNED_BYTE:return 1;case i.pe.SHORT:case i.pe.UNSIGNED_SHORT:case i.pe.HALF_FLOAT:return 2;case i.pe.FLOAT:case i.pe.INT:case i.pe.UNSIGNED_INT:return 4}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5740],{46130:(e,t,r)=>{r.d(t,{v:()=>n});var a=r(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,a.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},76553:(e,t,r)=>{function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>a})},33359:(e,t,r)=>{r.d(t,{save:()=>g,saveAs:()=>O});var a=r(4576),n=(r(44208),r(49186),r(71530)),o=r(60694),i=r(23154),s=r(83531),l=r(10407);const u="Feature Service",c="feature-layer-utils",p=`${c}-save`,d=`${c}-save-as`;function f(e){return{isValid:(0,s.W_)(e)&&(!("dynamicDataSource"in e)||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function m(e){const t=[],r=[];for(const{layer:a,layerJSON:n}of e)a.isTable?r.push(n):t.push(n);return{layers:t,tables:r}}function y(e){return m([e])}async function w(e,t){return/\/\d+\/?$/.test(e.url)?y(t[0]):async function(e,t){if(e.reverse(),!t)return m(e);const a=await async function(e,t){let a=await e.fetchData("json");if(function(e){return!!(e&&Array.isArray(e.layers)&&Array.isArray(e.tables))}(a))return a;a||={},function(e){e.layers||=[],e.tables||=[]}(a);const{layer:{url:n,customParameters:o,apiKey:s}}=t[0];return await async function(e,t,a){const{url:n,customParameters:o,apiKey:s}=t,{serviceJSON:l,layersJSON:u}=await(0,i.Q)(n,{customParameters:o,apiKey:s}),c=b(e.layers,l.layers,a),p=b(e.tables,l.tables,a);e.layers=c.itemResources,e.tables=p.itemResources;const d=[...c.added,...p.added],f=u?[...u.layers,...u.tables]:[];await async function(e,t,a,n){const o=await async function(e){const t=[];e.forEach((({type:e})=>{switch((0,i.K)(e)){case"CatalogLayer":t.push(Promise.all([r.e(893),r.e(2593),r.e(4196)]).then(r.bind(r,79003)).then((e=>e.default)));break;case"FeatureLayer":t.push(Promise.all([r.e(9953),r.e(3029),r.e(3600),r.e(9340)]).then(r.bind(r,13600)).then((e=>e.default)));break;case"OrientedImageryLayer":t.push(Promise.all([r.e(9953),r.e(3029),r.e(3600),r.e(8330)]).then(r.bind(r,97927)).then((e=>e.default)))}}));const a=await Promise.all(t),n=new Map;return e.forEach((({type:e},t)=>{n.set(e,a[t])})),n}(t),s=t.map((({id:e,type:t})=>new(o.get(t))({url:a,layerId:e,sourceJSON:n.find((({id:t})=>t===e))})));await Promise.allSettled(s.map((e=>e.load()))),s.forEach((t=>{const{layerId:r,loaded:a,defaultPopupTemplate:n}=t;if(!a||null==n)return;const o={id:r,popupInfo:n.toJSON()};"ArcGISFeatureLayer"!==t.operationalLayerType&&(o.layerType=t.operationalLayerType),I(t,o,e)}))}(e,d,n,f)}(a,{url:n??"",customParameters:o,apiKey:s},t.map((e=>e.layer.layerId))),a}(t,e);for(const t of e)I(t.layer,t.layerJSON,a);return function(e,t){const r=[],a=[];for(const{layer:e}of t){const{isTable:t,layerId:n}=e;t?a.push(n):r.push(n)}h(e.layers,r),h(e.tables,a)}(a,e),a}(t,e)}function h(e,t){if(e.length<2)return;const r=[];for(const{id:t}of e)r.push(t);(0,a.aI)(r.sort(v),t.slice().sort(v))&&e.sort(((e,r)=>{const a=t.indexOf(e.id),n=t.indexOf(r.id);return a<n?-1:a>n?1:0}))}function v(e,t){return e<t?-1:e>t?1:0}function b(e,t,r){const n=(0,a.iv)(e,t,((e,t)=>e.id===t.id));e=e.filter((e=>!n.removed.some((t=>t.id===e.id))));const o=n.added;return o.forEach((({id:t})=>{e.push({id:t})})),{itemResources:e,added:o.filter((({id:e})=>!r.includes(e)))}}function I(e,t,r){e.isTable?A(r.tables,t):A(r.layers,t)}function A(e,t){const r=e.findIndex((({id:e})=>e===t.id));-1===r?e.push(t):e[r]=t}async function P(e,t,r){!function(e,t){const r=e.layers.some((e=>"OrientedImageryLayer"===e.layerType));(0,l.Sm)(t,l.mm.ORIENTED_IMAGERY_LAYER,r)}(r,t)}async function S(e,t){const{url:r,layerId:a,title:n,fullExtent:i,isTable:s}=e,u=(0,o.qg)(r);t.url=("FeatureServer"===u?.serverType?r:`${r}/${a}`)??null,t.title||=n,t.extent=null,s||null==i||(t.extent=await(0,l.sQ)(i)),(0,l.OM)(t,l.mm.METADATA),(0,l.OM)(t,l.mm.MULTI_LAYER),(0,l.LG)(t,l.mm.SINGLE_LAYER),(0,l.Sm)(t,l.mm.TABLE,s),function(e,t){const r=e.some((e=>"oriented-imagery"===e.type));(0,l.Sm)(t,l.mm.ORIENTED_IMAGERY_LAYER,r)}([e],t)}async function g(e,t){return(0,n.UN)({layer:e,itemType:u,validateLayer:f,createItemData:(e,t)=>w(t,[e]),errorNamePrefix:p,setItemProperties:P},t)}async function O(e,t,r){return(0,n.Uh)({layer:e,itemType:u,validateLayer:f,createItemData:(e,t)=>Promise.resolve(y(e)),errorNamePrefix:d,newItem:t,setItemProperties:S},r)}},71530:(e,t,r)=>{r.d(t,{UN:()=>v,Uh:()=>b});var a=r(49186),n=r(46130),o=r(20655),i=r(80812),s=r(88788),l=r(10407),u=r(26121);async function c(e){const{layer:t,errorNamePrefix:r,validateLayer:n}=e;await t.load(),function(e,t,r){const n=r(e);if(!n.isValid)throw new a.A(`${t}:invalid-parameters`,n.errorMessage,{layer:e})}(t,r,n)}function p(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function d(e){const{item:t,errorNamePrefix:r,layer:n,validateItem:o}=e;if(function(e){const{item:t,itemType:r,additionalItemType:n,errorNamePrefix:o,layer:i}=e,s=[r];if(n&&s.push(n),!s.includes(t.type)){const e=s.map((e=>`'${e}'`)).join(", ");throw new a.A(`${o}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:t,layer:i})}}(e),o){const e=o(t);if(!e.isValid)throw new a.A(`${r}:invalid-parameters`,e.errorMessage,{layer:n})}}function f(e){const{layer:t,errorNamePrefix:r}=e,{portalItem:n}=t;if(!n)throw new a.A(`${r}:portal-item-not-set`,p(t,"requires the portalItem property to be set"));if(!n.loaded)throw new a.A(`${r}:portal-item-not-loaded`,p(t,"cannot be saved to a portal item that does not exist or is inaccessible"));d({...e,item:n})}function m(e){const{newItem:t,itemType:r}=e;let a=i.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=o.A.getDefault(),d({...e,item:a}),a}function y(e){return(0,s.m)(e,"portal-item")}async function w(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const a=e.write({},t);return await Promise.all(t.resources?.pendingOperations??[]),(0,u.c)(t,{errorName:"layer-write:unsupported"},r),a}function h(e){(0,l.LG)(e,l.mm.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function v(e,t){const{layer:r,createItemData:a,createJSONContext:o,setItemProperties:i,saveResources:s,supplementalUnsupportedErrors:l}=e;await c(e),f(e);const u=r.portalItem,p=o?o(u):y(u),d=await w(r,p,{...t,supplementalUnsupportedErrors:l}),m=await a({layer:r,layerJSON:d},u);return await(i?.(r,u,m)),h(u),await u.update({data:m}),(0,n.v)(p),await(s?.(u,p)),u}async function b(e,t){const{layer:r,createItemData:a,createJSONContext:o,setItemProperties:i,saveResources:s,supplementalUnsupportedErrors:l}=e;await c(e);const u=m(e),p=o?o(u):y(u),d=await w(r,p,{...t,supplementalUnsupportedErrors:l}),f=await a({layer:r,layerJSON:d},u);return await i(r,u,f),h(u),await async function(e,t,r){const a=e.portal;await a.signIn(),await a.user.addItem({item:e,data:t,folder:r?.folder})}(u,f,t),r.portalItem=u,(0,n.v)(p),await(s?.(u,p)),u}},88788:(e,t,r)=>{r.d(t,{m:()=>i,v:()=>o});var a=r(84952),n=r(20655);function o(e,t){return{...s(e,t),readResourcePaths:[]}}function i(e,t,r){const n=(0,a.An)(e.itemUrl);return{...s(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function s(e,t){return{origin:t,url:(0,a.An)(e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}},26121:(e,t,r)=>{r.d(t,{c:()=>i,d:()=>n});var a=r(49186);async function n(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}const o=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function i(e,t,r){let n=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new a.A(e,t,r)));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map((e=>new a.A("url:unsupported",`Relative url '${e}' is not supported`))))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:a}=r;e&&(n=n.filter((({name:e})=>!(o.has(e)||t.includes(e))))),a&&(n=n.filter((e=>"web-document-write:property-required"!==e.name)))}if(n.length>0)throw new a.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}}}]);