@arcgis/core 4.30.0-next.20240521 → 4.30.0-next.20240523

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 (130) hide show
  1. package/WebMap.js +1 -1
  2. package/assets/components/assets/icon/developerCredentials16.json +1 -0
  3. package/assets/components/assets/icon/developerCredentials24.json +1 -0
  4. package/assets/components/assets/icon/developerCredentials32.json +1 -0
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/{d7722531be4892293cb1.js → 00c49f6c84444e69f3a1.js} +1 -1
  7. package/assets/esri/core/workers/chunks/01927419855947110cc1.js.LICENSE.txt +1 -1
  8. package/assets/esri/core/workers/chunks/{df26d7d07fed1f124fc2.js → 0903b492782dca69eb48.js} +1 -1
  9. package/assets/esri/core/workers/chunks/158c05b16372d8ed33ea.js.LICENSE.txt +1 -1
  10. package/assets/esri/core/workers/chunks/190913c221964292333b.js.LICENSE.txt +1 -1
  11. package/assets/esri/core/workers/chunks/{2529a4b1e135223833f0.js → 2635ab64e75d4ec700a8.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{f965644347007e3d68e2.js → 27dc94db9ed42b237ecb.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{e727392db3b7998e5c28.js → 357707efc0cb8a1842c1.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{0ae3ea7a73f3b5083968.js → 3a01cf7e3355f3c78378.js} +1 -1
  15. package/assets/esri/core/workers/chunks/4268373bf374b2a6252a.js.LICENSE.txt +1 -1
  16. package/assets/esri/core/workers/chunks/43e1c935452b489e422e.js +1 -0
  17. package/assets/esri/core/workers/chunks/{938b158a7edbbb8e08a1.js → 44f8b57b0d8cfeabda1f.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{15212a82e283d6df2873.js → 4ae885f257660545ceeb.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{4ea2ced4b5ea1c8a1cee.js → 4ba866a10711b6a8158f.js} +1 -1
  20. package/assets/esri/core/workers/chunks/50ee28a1944bde74a7c1.js +1 -0
  21. package/assets/esri/core/workers/chunks/{d745c2df59e5d6c7a1dd.js → 53aa9124c11c03f70521.js} +1 -1
  22. package/assets/esri/core/workers/chunks/59b193d42e8abf9d4088.js.LICENSE.txt +1 -1
  23. package/assets/esri/core/workers/chunks/{eafbe663f7a61d3222c5.js → 5efe1300a39ab9c7bbab.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{eac4ec8c410eaf9e621c.js → 606f8b907166190a8b65.js} +2 -2
  25. package/assets/esri/core/workers/chunks/{eac4ec8c410eaf9e621c.js.LICENSE.txt → 606f8b907166190a8b65.js.LICENSE.txt} +1 -1
  26. package/assets/esri/core/workers/chunks/653da6469fe62e061efc.js +1 -0
  27. package/assets/esri/core/workers/chunks/{5349b0de83ae4be8afe2.js → 6c1ded9acf5c8be493ea.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{46225ebc10a4398170b5.js → 712ba8ad69b1aab6f508.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{7d210c2a5a135da2c37d.js → 7c68dc664c0b4cf2a46b.js} +1 -1
  30. package/assets/esri/core/workers/chunks/88c7d84a1fde246ca71f.js +1 -0
  31. package/assets/esri/core/workers/chunks/9b04a666726b5d2ff3c5.js.LICENSE.txt +1 -1
  32. package/assets/esri/core/workers/chunks/9c75837b7e75f0f38dc0.js.LICENSE.txt +1 -1
  33. package/assets/esri/core/workers/chunks/a6b138f330625d98f856.js +1 -0
  34. package/assets/esri/core/workers/chunks/{e4a0fd9e0f8887009b92.js → a8a19e5a7ae4ec16480a.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{fcf0016d56df8a69f6c1.js → aa198e898b46c6e89d0b.js} +1 -1
  36. package/assets/esri/core/workers/chunks/b2562f5d0d5a44dc004e.js +1 -0
  37. package/assets/esri/core/workers/chunks/{04faa3bf4ef5a6f0ccb4.js → b3de9bc3e75476b0a7e9.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{bd0545bb100b3393fd85.js → bbec62f8792520993909.js} +1 -1
  39. package/assets/esri/core/workers/chunks/bcd230d67bac27a1b36d.js +1 -0
  40. package/assets/esri/core/workers/chunks/bf6e75cc75d3bdfb70cb.js +1 -0
  41. package/assets/esri/core/workers/chunks/{5acac4616c53a95cc48f.js → c0c8e1a709648e1305c6.js} +1 -1
  42. package/assets/esri/core/workers/chunks/c80568ff68be908b3c30.js +1 -0
  43. package/assets/esri/core/workers/chunks/{85f24b441369e50e6ee1.js → c96ab8d56830b8ce07ed.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{4f3a87586e334c52d0bf.js → caffbaa8b0a67d117f34.js} +1 -1
  45. package/assets/esri/core/workers/chunks/ccad364912ff1d85a9dc.js +1 -0
  46. package/assets/esri/core/workers/chunks/{7b4ed96554722be59ae2.js → d8140b5316e80d734155.js} +1 -1
  47. package/assets/esri/core/workers/chunks/dde183c6bb1710ff16df.js.LICENSE.txt +1 -1
  48. package/assets/esri/core/workers/chunks/e3711bc5b100b64cac3a.js +1 -0
  49. package/assets/esri/core/workers/chunks/{2d5d66cee7c3ec992bcd.js → e93e59f6907fa4c1081c.js} +1 -1
  50. package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
  51. package/assets/esri/themes/base/widgets/_FeatureTable.scss +15 -1
  52. package/assets/esri/themes/base/widgets/_Grid.scss +4 -1
  53. package/assets/esri/themes/dark/main.css +1 -1
  54. package/assets/esri/themes/light/main.css +1 -1
  55. package/assets/esri/themes/light/view.css +1 -1
  56. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
  57. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
  58. package/chunks/LineSeries.js +1 -1
  59. package/chunks/Theme.js +1 -1
  60. package/chunks/Tooltip.js +1 -1
  61. package/chunks/chartUtilsAm5.js +1 -1
  62. package/core/sql/WhereClause.js +1 -1
  63. package/core/workers/InvokeHandler.js +1 -1
  64. package/core/workers/RemoteClient.js +1 -1
  65. package/interfaces.d.ts +543 -77
  66. package/layers/BuildingSceneLayer.js +1 -1
  67. package/layers/ImageryTileLayer.js +1 -1
  68. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  69. package/layers/mixins/OperationalLayer.js +1 -1
  70. package/layers/support/editableLayers.js +1 -1
  71. package/package.json +2 -2
  72. package/portal/PortalItem.js +1 -1
  73. package/portal/schemas/buildingSceneLayerItem.js +1 -1
  74. package/portal/schemas/definitions.js +1 -1
  75. package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
  76. package/rest/print.js +1 -1
  77. package/rest/support/printTaskUtils.js +1 -1
  78. package/smartMapping/renderers/support/referenceSizeUtils.js +1 -1
  79. package/smartMapping/support/adapters/support/layerUtils.js +1 -1
  80. package/support/revision.js +1 -1
  81. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  82. package/views/2d/GoToManager.js +1 -1
  83. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  84. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/utils.js +1 -1
  85. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  86. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  87. package/views/2d/layers/features/PipelineConnectionHandlers.js +1 -1
  88. package/views/2d/layers/features/Processor.js +1 -1
  89. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  90. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  91. package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
  92. package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
  93. package/views/3d/interactive/editingTools/ManipulatedObject3DGraphic.js +1 -1
  94. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  95. package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils.js +1 -1
  96. package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
  97. package/views/3d/interactive/editingTools/transform/ScaleRotateMeshAdapter.js +1 -1
  98. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  99. package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
  100. package/views/3d/interactive/editingTools/undoRecords.js +5 -0
  101. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  102. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  103. package/views/layers/ImageryTileLayerView.js +1 -1
  104. package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +4 -0
  105. package/widgets/CatalogLayerList.d.ts +4 -0
  106. package/widgets/CatalogLayerList.js +1 -1
  107. package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
  108. package/widgets/Expand.js +1 -1
  109. package/widgets/FeatureForm/support/textManipulationUtils.js +1 -1
  110. package/widgets/FeatureTable/VisibleElements.js +1 -1
  111. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  112. package/widgets/FeatureTable.js +1 -1
  113. package/widgets/Features/FeaturesViewModel.js +1 -1
  114. package/widgets/LayerList/ListItemPanel.js +1 -1
  115. package/widgets/LayerList/support/layerListUtils.js +1 -1
  116. package/widgets/Sketch/SketchViewModel.js +1 -1
  117. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  118. package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
  119. package/assets/esri/core/workers/chunks/0753c636c2801f067235.js +0 -1
  120. package/assets/esri/core/workers/chunks/3716015ccf0888c0a21d.js +0 -1
  121. package/assets/esri/core/workers/chunks/3f86042d9c0cc2d9acba.js +0 -1
  122. package/assets/esri/core/workers/chunks/50936725c9bd23b780ef.js +0 -1
  123. package/assets/esri/core/workers/chunks/5c8c5290b9fcb5a4468f.js +0 -1
  124. package/assets/esri/core/workers/chunks/95fb6643bd54d354f266.js +0 -1
  125. package/assets/esri/core/workers/chunks/aa020d495f464eff0134.js +0 -1
  126. package/assets/esri/core/workers/chunks/b52295fa9cf2f3244b65.js +0 -1
  127. package/assets/esri/core/workers/chunks/cbb3a56e4072cdf25a9d.js +0 -1
  128. package/assets/esri/core/workers/chunks/f4f1e1c1758542434384.js +0 -1
  129. package/assets/esri/core/workers/chunks/fb48e8e42379fdf8a094.js +0 -1
  130. package/views/3d/interactive/editingTools/transform/undoRecords.js +0 -5
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7899,1053,3069],{60945:(e,t,n)=>{n.d(t,{A:()=>f});var r,i=n(90237),o=n(25482),s=n(88930),a=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),c=n(40608),u=n(43937),h=n(56400);let p=r=class extends o.oY{static get allTime(){return d}static get empty(){return m}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===r&&n===i}expandTo(e,t=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,s.lL)(n,e,t));let i=this.end;if(i){const n=(0,s.lL)(i,e,t);i=i.getTime()===n.getTime()?n:(0,s.S1)(n,1,e,t)}return new r({start:n,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,a;return i>=t&&i<=n?s=i:t>=i&&t<=o&&(s=t),n>=i&&n<=o?a=n:o>=t&&o<=n&&(a=o),null==s||null==a||isNaN(s)||isNaN(a)?r.empty:new r({start:s===-1/0?null:new Date(s),end:a===1/0?null:new Date(a)})}offset(e,t,n=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new r,{start:o,end:a}=this;return null!=o&&(i.start=(0,s.S1)(o,e,t,n)),null!=a&&(i.end=(0,s.S1)(a,e,t,n)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,n=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:n})}};(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i._)([(0,l.w)("end")],p.prototype,"readEnd",null),(0,i._)([(0,u.K)("end")],p.prototype,"writeEnd",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i._)([(0,l.w)("start")],p.prototype,"readStart",null),(0,i._)([(0,u.K)("start")],p.prototype,"writeStart",null),p=r=(0,i._)([(0,c.$)("esri.TimeExtent")],p);const d=new p,m=new p({start:void 0,end:void 0}),f=p},11053:(e,t,n)=>{n.d(t,{c:()=>r,g:()=>i});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},11006:(e,t,n)=>{n.d(t,{q:()=>l});var r,i,o,s=n(11053),a={exports:{}};r=a,i=function(){function e(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);e(n,r,Math.max(i,Math.floor(r-l*u/a+h)),Math.min(o,Math.floor(r+(a-l)*u/a+h)),s)}var p=n[r],d=i,m=o;for(t(n,i,r),s(n[o],p)>0&&t(n,i,o);d<m;){for(t(n,d,m),d++,m--;s(n[d],p)<0;)d++;for(;s(n[m],p)>0;)m--}0===s(n[i],p)?t(n,i,m):t(n,++m,o),m<=r&&(i=m+1),r<=m&&(o=m-1)}}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return e<t?-1:e>t?1:0}return function(t,r,i,o,s){e(t,r,i||0,o||t.length-1,s||n)}},void 0!==(o=i())&&(r.exports=o);const l=(0,s.g)(a.exports)},69540:(e,t,n)=>{n.d(t,{O:()=>u,P:()=>h});var r=n(90237),i=n(69622),o=(n(44208),n(4718)),s=(n(53966),n(97768)),a=n(35666),l=n(88620),c=n(40608);const u=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,s.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,n=e.store,r={},i=new Map;for(const e in t){const s=t[e],l=n?.originOf(e),c=s.clonable;if(s.readOnly||!1===c||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const u=this[e];let h=null;h="function"==typeof c?c(u):"reference"===c?u:(0,o.TU)(u),null!=u&&null==h||(l===a.Gr.DEFAULTS?i.set(e,h):r[e]=h)}const c=new(0,Object.getPrototypeOf(this).constructor)(r);if(i.size){const e=(0,l.oY)(c)?.store;if(e)for(const[t,n]of i)e.set(t,n,a.Gr.DEFAULTS)}return c}};return t=(0,r._)([(0,c.$)("esri.core.Clonable")],t),t};let h=class extends(u(i.A)){};h=(0,r._)([(0,c.$)("esri.core.Clonable")],h)},4902:(e,t,n)=>{n.d(t,{PH:()=>a,sA:()=>s});var r=n(90237),i=n(40608);let o=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return t=(0,r._)([(0,i.$)("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:o++})}};return t=(0,r._)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(s(class{})){};l=(0,r._)([(0,i.$)("esri.core.Identifiable")],l)},92071:(e,t,n)=>{n.d(t,{P:()=>x,L:()=>v});var r=n(90237),i=n(69622),o=n(76953),s=n(4718),a=n(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,n=this._originStores[a.Gr.DEFAULTS];n&&n.forEach(((e,n)=>{t.set(n,(0,s.o8)(e),a.Gr.DEFAULTS)}));for(let n=a.Gr.SERVICE;n<a.AU;n++){const r=this._originStores[n];r&&r.forEach(((r,i)=>{e&&e.has(i)||t.set(i,(0,s.o8)(r),n)}))}return t}get(e,t){const n=void 0===t?this._values:this._originStores[t];return n?n.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,n=a.Gr.USER){let r=this._originStores[n];if(r||(r=new Map,this._originStores[n]=r),r.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=n){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,n),r!==t}return!1}delete(e,t=a.Gr.USER){const n=this._originStores[t];if(!n)return;const r=n.get(e);if(n.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let n=t-1;n>=0;n--){const t=this._originStores[n];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,n);break}}}return r}has(e,t){const n=void 0===t?this._values:this._originStores[t];return!!n&&n.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const n=this._originStores[t],r=n?.get(e),i=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),i!==r}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var c=n(45917),u=n(88620),h=n(40608);const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,u.oY)(this),n=t.store,r=new l;t.store=r,(0,o.k)(t,n,r)}read(e,t){(0,c.L)(this,e,t)}getAtOrigin(e,t){const n=d(this),r=(0,a.aB)(t);if("string"==typeof e)return n.get(e,r);const i={};return e.forEach((e=>{i[e]=n.get(e,r)})),i}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return d(this).originOf(e)}revert(e,t){const n=d(this),r=(0,a.aB)(t),i=(0,u.oY)(this);let o;o="string"==typeof e?"*"===e?n.keys(r):[e]:e,o.forEach((e=>{i.invalidate(e),n.revert(e,r),i.commit(e)}))}};return t=(0,r._)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function d(e){return(0,u.oY)(e).store}let m=class extends(p(i.A)){};m=(0,r._)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],m);var f=n(16649),y=n(49422);const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return _(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,y.M)(this,e=e||{},t),e}setAtOrigin(e,t,n){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(n))}removeOrigin(e){const t=_(this),n=(0,a.aB)(e),r=t.keys(n);for(const e of r)t.originOf(e)===n&&t.set(e,t.get(e,n),a.Gr.USER)}updateOrigin(e,t){const n=_(this),r=(0,a.aB)(t),i=(0,f.Jt)(this,e);for(let t=r+1;t<a.AU;++t)n.delete(e,t);n.set(e,i,r)}toJSON(e){return this.write({},e)}};return t=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function _(e){return(0,u.oY)(e).store}const x=e=>{let t=class extends(g(p(e))){constructor(...e){super(...e)}};return t=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport")],t),t};let v=class extends(x(i.A)){};v=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport")],v)},43668:(e,t,n)=>{n.d(t,{M5:()=>h,eV:()=>u});var r=n(78888),i=n(49186),o=n(74887),s=n(84952),a=n(26306);let l=null,c=!0;function u(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,n)}catch(e){c=!1}const i=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function h(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,a.M)(n.data),mediaType:n.mediaType};const i=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(n.bind(n,10820));if(e(l))return r(l,t)}if(u){const{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(n.bind(n,22390));if(e(l))return r(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,o.zf)(e))throw new i.A("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),t)}},29242:(e,t,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function i(e,t,n,r,i,o,s,a,l){return[e,t,n,r,i,o,s,a,l]}n.d(t,{fA:()=>i,vt:()=>r,zK:()=>o});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:r,createView:function(e,t){return new Float64Array(e,t,9)},fromValues:i},Symbol.toStringTag,{value:"Module"}))},48163:(e,t,n)=>{function r(){return[0,0]}function i(e,t){return[e,t]}function o(){return i(1,1)}function s(){return i(1,0)}function a(){return i(0,1)}n.d(t,{Un:()=>l,fA:()=>i,vt:()=>r});const l=o(),c=s(),u=a();Object.freeze(Object.defineProperty({__proto__:null,ONES:l,UNIT_X:c,UNIT_Y:u,ZEROS:[0,0],clone:function(e){return[e[0],e[1]]},create:r,createView:function(e,t){return new Float64Array(e,t,2)},fromArray:function(e,t=[0,0]){const n=Math.min(2,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t},fromValues:i,ones:o,unitX:s,unitY:a,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},77690:(e,t,n)=>{n.d(t,{B8:()=>a,Ge:()=>p,I0:()=>h,KC:()=>l,hZ:()=>o,hs:()=>u,lw:()=>c,mg:()=>s,z0:()=>i});var r=n(34304);function i(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function o(e,t,n,r,i,o,s,a,l,c){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=s,e[6]=a,e[7]=l,e[8]=c,e}function s(e,t){if(e===t){const n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function a(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=u*s-a*c,p=-u*o+a*l,d=c*o-s*l;let m=n*h+r*p+i*d;return m?(m=1/m,e[0]=h*m,e[1]=(-u*r+i*c)*m,e[2]=(a*r-i*s)*m,e[3]=p*m,e[4]=(u*n-i*l)*m,e[5]=(-a*n+i*o)*m,e[6]=d*m,e[7]=(-c*n+r*l)*m,e[8]=(s*n-r*o)*m,e):null}function l(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8];return e[0]=s*u-a*c,e[1]=i*c-r*u,e[2]=r*a-i*s,e[3]=a*l-o*u,e[4]=n*u-i*l,e[5]=i*o-n*a,e[6]=o*c-s*l,e[7]=r*l-n*c,e[8]=n*s-r*o,e}function c(e,t,n){const r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],p=n[0],d=n[1],m=n[2],f=n[3],y=n[4],g=n[5],_=n[6],x=n[7],v=n[8];return e[0]=p*r+d*s+m*c,e[1]=p*i+d*a+m*u,e[2]=p*o+d*l+m*h,e[3]=f*r+y*s+g*c,e[4]=f*i+y*a+g*u,e[5]=f*o+y*l+g*h,e[6]=_*r+x*s+v*c,e[7]=_*i+x*a+v*u,e[8]=_*o+x*l+v*h,e}function u(e,t,n){const r=n[0],i=n[1],o=n[2];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=o*t[6],e[7]=o*t[7],e[8]=o*t[8],e}function h(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=n+n,a=r+r,l=i+i,c=n*s,u=r*s,h=r*a,p=i*s,d=i*a,m=i*l,f=o*s,y=o*a,g=o*l;return e[0]=1-h-m,e[3]=u-g,e[6]=p+y,e[1]=u+g,e[4]=1-c-m,e[7]=d-f,e[2]=p-y,e[5]=d+f,e[8]=1-c-h,e}function p(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=t[9],p=t[10],d=t[11],m=t[12],f=t[13],y=t[14],g=t[15],_=n*a-r*s,x=n*l-i*s,v=n*c-o*s,M=r*l-i*a,w=r*c-o*a,b=i*c-o*l,S=u*f-h*m,A=u*y-p*m,I=u*g-d*m,P=h*y-p*f,L=h*g-d*f,T=p*g-d*y;let O=_*T-x*L+v*P+M*I-w*A+b*S;return O?(O=1/O,e[0]=(a*T-l*L+c*P)*O,e[1]=(l*I-s*T-c*A)*O,e[2]=(s*L-a*I+c*S)*O,e[3]=(i*L-r*T-o*P)*O,e[4]=(n*T-i*I+o*A)*O,e[5]=(r*I-n*L-o*S)*O,e[6]=(f*b-y*w+g*M)*O,e[7]=(y*v-m*b-g*x)*O,e[8]=(m*w-f*v+g*_)*O,e):null}function d(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e}const m=c,f=d;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e},adjoint:l,copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},determinant:function(e){const t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8];return t*(c*o-s*l)+n*(-c*i+s*a)+r*(l*i-o*a)},equals:function(e,t){const n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],p=t[0],d=t[1],m=t[2],f=t[3],y=t[4],g=t[5],_=t[6],x=t[7],v=t[8],M=(0,r.FD)();return Math.abs(n-p)<=M*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(i-d)<=M*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-m)<=M*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(s-f)<=M*Math.max(1,Math.abs(s),Math.abs(f))&&Math.abs(a-y)<=M*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(l-g)<=M*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(c-_)<=M*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(u-x)<=M*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(h-v)<=M*Math.max(1,Math.abs(h),Math.abs(v))},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2)},fromMat2d:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e},fromMat4:i,fromQuat:h,fromRotation:function(e,t){const n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromTranslation:function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e},identity:function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},invert:a,isOrthoNormal:function(e){const t=(0,r.FD)(),n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8];return Math.abs(1-(n*n+s*s+c*c))<=t&&Math.abs(1-(i*i+a*a+u*u))<=t&&Math.abs(1-(o*o+l*l+h*h))<=t},mul:m,multiply:c,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e},normalFromMat4:p,normalFromMat4Legacy:function(e,t){const n=t[0],r=t[1],i=t[2],o=t[4],s=t[5],a=t[6],l=t[8],c=t[9],u=t[10],h=u*s-a*c,p=-u*o+a*l,d=c*o-s*l,m=n*h+r*p+i*d;if(!m)return null;const f=1/m;return e[0]=h*f,e[1]=(-u*r+i*c)*f,e[2]=(a*r-i*s)*f,e[3]=p*f,e[4]=(u*n-i*l)*f,e[5]=(-a*n+i*o)*f,e[6]=d*f,e[7]=(-c*n+r*l)*f,e[8]=(s*n-r*o)*f,e},projection:function(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e},rotate:function(e,t,n){const r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],p=Math.sin(n),d=Math.cos(n);return e[0]=d*r+p*s,e[1]=d*i+p*a,e[2]=d*o+p*l,e[3]=d*s-p*r,e[4]=d*a-p*i,e[5]=d*l-p*o,e[6]=c,e[7]=u,e[8]=h,e},scale:u,scaleByVec2:function(e,t,n){const r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e},set:o,str:function(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"},sub:f,subtract:d,translate:function(e,t,n){const r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],p=n[0],d=n[1];return e[0]=r,e[1]=i,e[2]=o,e[3]=s,e[4]=a,e[5]=l,e[6]=p*r+d*s+c,e[7]=p*i+d*a+u,e[8]=p*o+d*l+h,e},transpose:s},Symbol.toStringTag,{value:"Module"}))},37585:(e,t,n)=>{n.d(t,{Cc:()=>f,Io:()=>u,S8:()=>m,WQ:()=>o,e$:()=>g,hZ:()=>i,hs:()=>c,jb:()=>x,l0:()=>y});var r=n(34304);function i(e,t,n){return e[0]=t,e[1]=n,e}function o(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function s(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function a(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function l(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function c(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function u(e,t){const n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}function h(e,t){const n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function p(e){const t=e[0],n=e[1];return Math.sqrt(t*t+n*n)}function d(e){const t=e[0],n=e[1];return t*t+n*n}function m(e,t){const n=t[0],r=t[1];let i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i),e}function f(e,t,n,r){const i=t[0],o=t[1];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e}function y(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function g(e,t,n,r){const i=t[0]-n[0],o=t[1]-n[1],s=Math.sin(r),a=Math.cos(r);return e[0]=i*a-o*s+n[0],e[1]=i*s+o*a+n[1],e}const _=p,x=s,v=a,M=l,w=u,b=h,S=d;Object.freeze(Object.defineProperty({__proto__:null,add:o,angle:function(e,t){const n=e[0],r=e[1],i=t[0],o=t[1];let s=n*n+r*r;s>0&&(s=1/Math.sqrt(s));let a=i*i+o*o;a>0&&(a=1/Math.sqrt(a));const l=(n*i+r*o)*s*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e},cross:function(e,t,n){const r=t[0]*n[1]-t[1]*n[0];return e[0]=e[1]=0,e[2]=r,e},dist:w,distance:u,div:M,divide:l,dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},equals:function(e,t){const n=e[0],i=e[1],o=t[0],s=t[1],a=(0,r.FD)();return Math.abs(n-o)<=a*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-s)<=a*Math.max(1,Math.abs(i),Math.abs(s))},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e},len:_,length:p,lerp:f,max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e},mul:v,multiply:a,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},normalize:m,projectAndScale:function(e,t,n,r,i){let o=t[0]-n[0],s=t[1]-n[1];const a=(r[0]*o+r[1]*s)*(i-1);return o=r[0]*a,s=r[1]*a,e[0]=t[0]+o,e[1]=t[1]+s,e},random:function(e,t){t=t||1;const n=2*(0,r.Ov)()*Math.PI;return e[0]=Math.cos(n)*t,e[1]=Math.sin(n)*t,e},rotate:g,round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e},scale:c,scaleAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e},set:i,sqrDist:b,sqrLen:S,squaredDistance:h,squaredLength:d,str:function(e){return"vec2("+e[0]+", "+e[1]+")"},sub:x,subtract:s,transformMat2:function(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e},transformMat2d:y,transformMat3:function(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[3]*i+n[6],e[1]=n[1]*r+n[4]*i+n[7],e},transformMat4:function(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e}},Symbol.toStringTag,{value:"Module"}))},75503:(e,t,n)=>{n.d(t,{w:()=>s});var r=n(4576),i=(n(44208),n(3694)),o=n(11006);class s{constructor(e=9,t){this._compareMinX=h,this._compareMinY=p,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),v.prune(),M.prune(),w.prune(),b.prune()}all(e){a(this._data,e)}search(e,t){let n=this._data;const r=this._toBBox;if(_(e,n))for(v.clear();n;){for(let i=0,o=n.children.length;i<o;i++){const o=n.children[i],s=n.leaf?r(o):o;_(e,s)&&(n.leaf?t(o):g(e,s)?a(o,t):v.push(o))}n=v.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!_(e,t))return!1;for(v.clear();t;){for(let r=0,i=t.children.length;r<i;r++){const i=t.children[r],o=t.leaf?n(i):i;if(_(e,o)){if(t.leaf||g(e,o))return!0;v.push(i)}}t=v.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,n=this._data,i=null,o=0,s=!1;const a=this._toBBox(e);for(w.clear(),b.clear();n||w.length>0;){if(n||(n=w.pop(),i=w.data[w.length-1],o=b.pop()??0,s=!0),n.leaf&&(t=(0,r.qh)(n.children,e,n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),w.push(n),this._condense(w),this;s||n.leaf||!g(n,a)?i?(o++,n=i.children[o],s=!1):n=null:(w.push(n),b.push(o),o=0,i=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,r){const i=n-t+1;let o=this._maxEntries;if(i<=o){const r=new I(e.slice(t,n+1));return l(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/o**(r-1)));const s=new P([]);s.height=r;const a=Math.ceil(i/o),c=a*Math.ceil(Math.sqrt(o));x(e,t,n,c,this._compareMinX);for(let i=t;i<=n;i+=c){const t=Math.min(i+c-1,n);x(e,i,t,a,this._compareMinY);for(let n=i;n<=t;n+=a){const i=Math.min(n+a-1,t);s.children.push(this._build(e,n,i,r-1))}}return l(s,this._toBBox),s}_insert(e,t,n){const r=this._toBBox,i=n?e:r(e);w.clear();const o=function(e,t,n,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=d(s),l=f(e,s)-a;l<i?(i=l,r=a<r?a:r,n=s):l===i&&a<r&&(r=a,n=s)}t=n||t.children[0]}return t}(i,this._data,t,w);for(o.children.push(e),u(o,i);t>=0&&w.data[t].children.length>this._maxEntries;)this._split(w,t),t--;!function(e,t,n){for(let r=n;r>=0;r--)u(t.data[r],e)}(i,w,t)}_split(e,t){const n=e.data[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const o=this._chooseSplitIndex(n,i,r);if(!o)return;const s=n.children.splice(o,n.children.length-o),a=n.leaf?new I(s):new P(s);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new P([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,i,o;r=i=1/0;for(let s=t;s<=n-t;s++){const t=c(e,0,s,this._toBBox),a=c(e,s,n,this._toBBox),l=y(t,a),u=d(t)+d(a);l<r?(r=l,o=s,i=u<i?u:i):l===r&&u<i&&(i=u,o=s)}return o}_chooseSplitAxis(e,t,n){const r=e.leaf?this._compareMinX:h,i=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const i=this._toBBox,o=c(e,0,t,i),s=c(e,n-t,n,i);let a=m(o)+m(s);for(let r=t;r<n-t;r++){const t=e.children[r];u(o,e.leaf?i(t):t),a+=m(o)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];u(s,e.leaf?i(t):t),a+=m(s)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const i=e.data[t-1],o=i.children;o.splice((0,r.qh)(o,n,o.length,i.indexHint),1)}else this.clear();else l(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let n=e;for(M.clear();n;){if(!0===n.leaf)for(const e of n.children)t(e);else M.pushArray(n.children);n=M.pop()??null}}function l(e,t){c(e,0,e.children.length,t,e)}function c(e,t,n,r,i){i||(i=new I([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o,s=t;s<n;s++)o=e.children[s],u(i,e.leaf?r(o):o);return i}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,n,r,i){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=r)continue;const a=n+Math.ceil((t-n)/r/2)*r;(0,o.q)(e,a,n,t,i),s.push(n,a,a,t)}}const v=new i.A,M=new i.A,w=new i.A,b=new i.A({deallocator:void 0});class S{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends S{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class I extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class P extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},36708:(e,t,n)=>{n.d(t,{C_:()=>p,OH:()=>f,Vh:()=>y,on:()=>h,pc:()=>g,wB:()=>l,z7:()=>c}),n(60999),n(5503);var r=n(37955),i=n(36563),o=n(97768),s=n(74887),a=n(14012);function l(e,t,n={}){return u(e,t,n,d)}function c(e,t,n={}){return u(e,t,n,m)}function u(e,t,n={},r){let i=null;const s=n.once?(e,n)=>{r(e)&&((0,o.xt)(i),t(e,n))}:(e,n)=>{r(e)&&t(e,n)};if(i=(0,a.Cn)(e,s,n.sync,n.equals),n.initial){const t=e();s(t,t)}return i}function h(e,t,n,s={}){let a=null,c=null,u=null;function h(){a&&c&&(c.remove(),s.onListenerRemove?.(a),a=null,c=null)}function p(e){s.once&&s.once&&(0,o.xt)(u),n(e)}const d=l(e,((e,n)=>{h(),(0,r.wb)(e)&&(a=e,c=(0,r.on)(e,t,p),s.onListenerAdd?.(e))}),{sync:s.sync,initial:!0});return u=(0,i.hA)((()=>{d.remove(),h()})),u}function p(e,t){return function(e,t,n){if((0,s.G4)(n))return Promise.reject((0,s.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,o.xt)(a)}return new Promise(((r,o)=>{a=(0,i.vE)([(0,s.u7)(n,(()=>{l(),o((0,s.NK)())})),u(e,(e=>{l(),r(e)}),{sync:!1,once:!0},t??d)])}))}(e,m,t)}function d(e){return!0}function m(e){return!!e}n(80559);const f={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},13069:(e,t,n)=>{n.d(t,{lk:()=>i,vD:()=>s,yS:()=>o});const r="randomUUID"in crypto;function i(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}},80754:(e,t,n)=>{n.d(t,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>c});var r=n(82799),i=n(16930),o=n(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=c(e);for(const e of n)for(const n of e)n[0]+=t;return e}function c(e){return(0,o.Bi)(e)?e.rings:e.paths}},4146:(e,t,n)=>{n.d(t,{A:()=>v});var r=n(90237),i=(n(59456),n(78888)),o=n(60945),s=n(49186),a=n(65529),l=n(4902),c=n(92474),u=n(53966),h=n(74887),p=n(84952),d=n(10107),m=(n(44208),n(87811),n(40608)),f=n(92602),y=n(5443),g=n(16930);let _=0,x=class extends(a.A.EventedMixin((0,l.sA)(c.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.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 n.e(7982).then(n.bind(n,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await n.e(5613).then(n.bind(n,45613));try{return await r(t)}catch(e){const n=t?.portalItem,r=n?.id||"unset",i=n?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,h.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 hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,p.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,d.MZ)({type:String})],x.prototype,"attributionDataUrl",void 0),(0,r._)([(0,d.MZ)({type:y.A})],x.prototype,"fullExtent",void 0),(0,r._)([(0,d.MZ)({readOnly:!0})],x.prototype,"hasAttributionData",null),(0,r._)([(0,d.MZ)({type:String,clonable:!1})],x.prototype,"id",void 0),(0,r._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],x.prototype,"legendEnabled",void 0),(0,r._)([(0,d.MZ)({type:["show","hide","hide-children"]})],x.prototype,"listMode",void 0),(0,r._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],x.prototype,"opacity",void 0),(0,r._)([(0,d.MZ)({clonable:!1})],x.prototype,"parent",void 0),(0,r._)([(0,d.MZ)({readOnly:!0})],x.prototype,"parsedUrl",null),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],x.prototype,"persistenceEnabled",void 0),(0,r._)([(0,d.MZ)({type:Boolean})],x.prototype,"popupEnabled",void 0),(0,r._)([(0,d.MZ)({type:Boolean})],x.prototype,"attributionVisible",void 0),(0,r._)([(0,d.MZ)({type:g.A})],x.prototype,"spatialReference",void 0),(0,r._)([(0,d.MZ)({type:String})],x.prototype,"title",void 0),(0,r._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],x.prototype,"type",void 0),(0,r._)([(0,d.MZ)()],x.prototype,"url",void 0),(0,r._)([(0,d.MZ)({type:o.A})],x.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],x.prototype,"visible",void 0),x=(0,r._)([(0,m.$)("esri.layers.Layer")],x);const v=x},87899:(e,t,n)=>{n.r(t),n.d(t,{default:()=>mt});var r=n(90237),i=n(5503),o=n(49186),s=n(53966),a=n(92071),l=n(74887),c=n(10107),u=n(79901),h=(n(87811),n(44208),n(36005)),p=n(40608),d=n(43937),m=n(35666),f=n(4146),y=n(63074),g=n(16131),_=n(8303),x=n(25036),v=n(69540),M=n(25482),w=n(77690),b=n(29242),S=n(37585),A=n(38954);const I=(0,n(51850).vt)(),P=(0,b.vt)(),L=(0,b.vt)(),T=(0,b.vt)();function O(e,t,n){return(0,A.s)(I,t[0],t[1],1),(0,A.t)(I,I,(0,w.mg)(P,n)),0===I[2]?(0,S.hZ)(e,I[0],I[1]):(0,S.hZ)(e,I[0]/I[2],I[1]/I[2])}function E(e,t,n){return R(L,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),R(T,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,w.lw)(e,(0,w.KC)(L,L),T),0!==e[8]&&(e[0]/=e[8],e[1]/=e[8],e[2]/=e[8],e[3]/=e[8],e[4]/=e[8],e[5]/=e[8],e[6]/=e[8],e[7]/=e[8],e[8]/=e[8]),e}function R(e,t,n,r,i,o,s,a,l){(0,w.hZ)(e,t,r,o,n,i,s,1,1,1),(0,A.s)(I,a,l,1),(0,w.KC)(P,e);const[c,u,h]=(0,A.t)(I,I,(0,w.mg)(P,P));return(0,w.hZ)(P,c,0,0,0,u,0,0,0,h),(0,w.lw)(e,P,e)}var B=n(90629),Z=n(48163),G=n(86738),C=n(39829),j=n(57251),U=n(16930);let N=class extends v.P{projectOrWarn(e,t){if(null==e)return e;const{geometry:n,pending:r}=(0,j.projectOrLoad)(e,t);return r?null:r||n?n:(s.A.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:e,sourceSpatialReference:e.spatialReference,targetSpatialReference:t}),null)}};N=(0,r._)([(0,p.$)("esri.layers.support.GeoreferenceBase")],N);const $=N,Y=(0,b.vt)(),D=(0,Z.vt)();let X=class extends M.oY{};(0,r._)([(0,c.MZ)({type:Number,json:{write:!0}})],X.prototype,"x",void 0),(0,r._)([(0,c.MZ)({type:Number,json:{write:!0}})],X.prototype,"y",void 0),X=(0,r._)([(0,p.$)("esri.layers.support.ControlPointsGeoreference.ControlPointJSONType")],X);let H=class extends v.P{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,r._)([(0,c.MZ)()],H.prototype,"sourcePoint",void 0),(0,r._)([(0,c.MZ)({type:G.A})],H.prototype,"mapPoint",void 0),H=(0,r._)([(0,p.$)("esri.layers.support.ControlPointsGeoreference.ControlPoint")],H);let F=class extends((0,M.Te)($)){constructor(e){super(e),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(e,t){const n=U.A.fromJSON(t.spatialReference),r=(0,b.fA)(...t.coefficients,1);return e.map((e=>((0,S.hZ)(D,e.x,e.y),O(D,D,r),{sourcePoint:e,mapPoint:new G.A({x:D[0],y:D[1],spatialReference:n})})))}writeControlPoints(e,t,n,r){if(null!=this.transform)null!=e&&V(e[0])&&(t.controlPoints=e.map((e=>{const t=e.sourcePoint;return{x:t.x,y:t.y}})),t.spatialReference=e[0].mapPoint.spatialReference.toJSON(),t.coefficients=this.transform.slice(0,8));else{const e=new o.A("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration.",{layer:r?.layer,georeference:this});r?.messages?r.messages.push(e):s.A.getLogger(this).error(e.name,e.message)}}get coords(){if(null==this.controlPoints)return null;const e=this._updateTransform(Y);if(null==e||!V(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return function(e,t,n,r){const i=(0,Z.fA)(0,n),o=(0,Z.fA)(0,0),s=(0,Z.fA)(t,0),a=(0,Z.fA)(t,n);return O(i,i,e),O(o,o,e),O(s,s,e),O(a,a,e),new C.A({rings:[[i,o,s,a,i]],spatialReference:r})}(e,this.width,this.height,t)}set coords(e){if(null==this.controlPoints||!V(this.controlPoints[0]))return;const t=this.controlPoints[0].mapPoint.spatialReference;if(null==(e=this.projectOrWarn(e,t)))return;const{width:n,height:r}=this,{rings:[[i,o,s,a]]}=e,l={sourcePoint:(0,B.tc)(0,r),mapPoint:new G.A({x:i[0],y:i[1],spatialReference:t})},c={sourcePoint:(0,B.tc)(0,0),mapPoint:new G.A({x:o[0],y:o[1],spatialReference:t})},u={sourcePoint:(0,B.tc)(n,0),mapPoint:new G.A({x:s[0],y:s[1],spatialReference:t})},h={sourcePoint:(0,B.tc)(n,r),mapPoint:new G.A({x:a[0],y:a[1],spatialReference:t})};V(l)&&V(c)&&V(u)&&V(h)&&(re(Y,l,c,u,h),this.controlPoints=this.controlPoints.map((({sourcePoint:e})=>((0,S.hZ)(D,e.x,e.y),O(D,D,Y),{sourcePoint:e,mapPoint:new G.A({x:D[0],y:D[1],spatialReference:t})}))))}get inverseTransform(){return null==this.transform?null:(0,w.B8)((0,b.vt)(),this.transform)}get transform(){return this._updateTransform()}toMap(e){if(null==e||null==this.transform||null==this.controlPoints||!V(this.controlPoints[0]))return null;(0,S.hZ)(D,e.x,e.y);const t=this.controlPoints[0].mapPoint.spatialReference;return O(D,D,this.transform),new G.A({x:D[0],y:D[1],spatialReference:t})}toSource(e){if(null==e||null==this.inverseTransform||null==this.controlPoints||!V(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return e=e.normalize(),null==(e=(0,j.projectOrLoad)(e,t).geometry)?null:((0,S.hZ)(D,e.x,e.y),O(D,D,this.inverseTransform),(0,B.tc)(D[0],D[1]))}toSourceNormalized(e){const t=this.toSource(e);return null!=t&&(t.x/=this.width,t.y/=this.height),t}_updateTransform(e){const{controlPoints:t,width:n,height:r}=this;if(!(null!=t&&n>0&&r>0))return null;const[i,o,s,a]=t;if(!V(i))return null;const l=i.mapPoint.spatialReference,c=this._projectControlPoint(o,l),u=this._projectControlPoint(s,l),h=this._projectControlPoint(a,l);if(!c.valid||!u.valid||!h.valid)return null;if(!V(c.controlPoint))return null;null==e&&(e=(0,b.vt)());let p=null;return p=V(u.controlPoint)&&V(h.controlPoint)?re(e,i,c.controlPoint,u.controlPoint,h.controlPoint):V(u.controlPoint)?function(e,t,n,r){return ne(W,K,t),ne(z,J,n),ne(k,Q,r),(0,S.Cc)(q,W,z,.5),(0,S.e$)(q,k,q,Math.PI),(0,S.Cc)(ee,K,J,.5),(0,S.e$)(ee,Q,ee,Math.PI),ae(e,W,z,k,q,K,J,Q,ee)}(e,i,c.controlPoint,u.controlPoint):function(e,t,n){return ne(W,K,t),ne(z,J,n),(0,S.e$)(k,z,W,te),(0,S.e$)(q,W,z,te),(0,S.e$)(Q,J,K,-te),(0,S.e$)(ee,K,J,-te),ae(e,W,z,k,q,K,J,Q,ee)}(e,i,c.controlPoint),p.every((e=>0===e))?null:p}_projectControlPoint(e,t){if(!V(e))return{valid:!0,controlPoint:e};const{sourcePoint:n,mapPoint:r}=e,{geometry:i,pending:o}=(0,j.projectOrLoad)(r,t);return o?{valid:!1,controlPoint:null}:o||i?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:i}}:(s.A.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:e,sourceSpatialReference:r.spatialReference,targetSpatialReference:t}),{valid:!1,controlPoint:null})}};function V(e){return null!=e?.sourcePoint&&null!=e.mapPoint}(0,r._)([(0,c.MZ)({type:[H],json:{write:{allowNull:!1,isRequired:!0,target:{controlPoints:{type:[X]},coefficients:{type:[Number]},spatialReference:{type:U.A}}}}})],F.prototype,"controlPoints",void 0),(0,r._)([(0,h.w)("controlPoints")],F.prototype,"readControlPoints",null),(0,r._)([(0,d.K)("controlPoints")],F.prototype,"writeControlPoints",null),(0,r._)([(0,c.MZ)({clonable:!1})],F.prototype,"coords",null),(0,r._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],F.prototype,"height",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],F.prototype,"inverseTransform",null),(0,r._)([(0,c.MZ)({readOnly:!0})],F.prototype,"transform",null),(0,r._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],F.prototype,"width",void 0),F=(0,r._)([(0,p.$)("esri.layers.support.ControlPointsGeoreference")],F);const W=(0,Z.vt)(),z=(0,Z.vt)(),k=(0,Z.vt)(),q=(0,Z.vt)(),K=(0,Z.vt)(),J=(0,Z.vt)(),Q=(0,Z.vt)(),ee=(0,Z.vt)(),te=Math.PI/2;function ne(e,t,n){(0,S.hZ)(e,n.sourcePoint.x,n.sourcePoint.y),(0,S.hZ)(t,n.mapPoint.x,n.mapPoint.y)}function re(e,t,n,r,i){return ne(W,K,t),ne(z,J,n),ne(k,Q,r),ne(q,ee,i),ae(e,W,z,k,q,K,J,Q,ee)}const ie=new Array(8).fill(0),oe=new Array(8).fill(0);function se(e,t,n,r,i){return e[0]=t[0],e[1]=t[1],e[2]=n[0],e[3]=n[1],e[4]=r[0],e[5]=r[1],e[6]=i[0],e[7]=i[1],e}function ae(e,t,n,r,i,o,s,a,l){return E(e,se(ie,t,n,r,i),se(oe,o,s,a,l))}const le=F;var ce=n(78888),ue=n(43668),he=n(84952),pe=n(13069),de=n(4902),me=n(92474);const fe=(0,Z.vt)();let ye=class extends ${constructor(e){super(e),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:e,topRight:t,bottomLeft:n,bottomRight:r}=this;if(null==e||null==t||null==n||null==r)return null;const i=e.spatialReference;return t=this.projectOrWarn(t,i),n=this.projectOrWarn(n,i),r=this.projectOrWarn(r,i),null==t||null==n||null==r?null:new C.A({rings:[[[n.x,n.y],[e.x,e.y],[t.x,t.y],[r.x,r.y],[n.x,n.y]]],spatialReference:i})}set coords(e){const{topLeft:t}=this;if(null==t)return;const n=t.spatialReference;if(null==(e=this.projectOrWarn(e,n)))return;const{rings:[[r,i,o,s]]}=e;this.bottomLeft=new G.A({x:r[0],y:r[1],spatialReference:n}),this.topLeft=new G.A({x:i[0],y:i[1],spatialReference:n}),this.topRight=new G.A({x:o[0],y:o[1],spatialReference:n}),this.bottomRight=new G.A({x:s[0],y:s[1],spatialReference:n})}toSourceNormalized(e){const{topLeft:t,topRight:n,bottomRight:r,bottomLeft:i}=this;if(null==e||null==t||null==n||null==r||null==i)return null;const o=t.spatialReference;e=e.normalize();const s=(0,j.projectOrLoad)(e,o).geometry;if(null==s)return null;(0,S.hZ)(fe,s.x,s.y);const a=E((0,b.vt)(),[t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y],[0,0,0,1,1,0,1,1]);return O(fe,fe,a),(0,B.tc)(fe[0],fe[1])}};(0,r._)([(0,c.MZ)({clonable:!1})],ye.prototype,"coords",null),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"bottomLeft",void 0),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"bottomRight",void 0),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"topLeft",void 0),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"topRight",void 0),ye=(0,r._)([(0,p.$)("esri.layers.support.CornersGeoreference")],ye);const ge=ye;var _e=n(34727),xe=n(34304),ve=n(5443);let Me=class extends ${constructor(e){super(e),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:e,ymin:t,xmax:n,ymax:r,spatialReference:i}=this.extent;let o;if(this.rotation){const{x:i,y:s}=this.extent.center,a=we(i,s,this.rotation);o=[a(e,t),a(e,r),a(n,r),a(n,t)],o.push(o[0])}else o=[[e,t],[e,r],[n,r],[n,t],[e,t]];return new C.A({rings:[o],spatialReference:i})}set coords(e){if(null==e||null==this.extent)return;const t=this.extent.spatialReference;if(e=this.projectOrWarn(e,t),null==e?.extent)return;const{rings:[[n,r,i]],extent:{center:{x:o,y:s}}}=e,a=(0,_e.KJ)(Math.PI/2-Math.atan2(r[1]-n[1],r[0]-n[0])),l=we(o,s,-a),[c,u]=l(n[0],n[1]),[h,p]=l(i[0],i[1]);this.extent=new ve.A({xmin:c,ymin:u,xmax:h,ymax:p,spatialReference:t}),this.rotation=a}toSourceNormalized(e){const{extent:t,rotation:n}=this;if(null==e||null==t)return null;const{xmin:r,ymin:i,xmax:o,ymax:s,center:a,spatialReference:l}=t;e=e.normalize();const c=(0,j.projectOrLoad)(e,l).geometry;if(null==c)return null;let u=c.x,h=c.y;return n&&([u,h]=we(a.x,a.y,-n)(u,h)),(0,B.tc)((0,_e.hs)(u,r,o,0,1),(0,_e.hs)(h,s,i,0,1))}};function we(e,t,n){const r=(0,xe.DF)(n),i=Math.cos(r),o=Math.sin(r);return(n,r)=>[i*(n-e)+o*(r-t)+e,i*(r-t)-o*(n-e)+t]}(0,r._)([(0,c.MZ)({clonable:!1})],Me.prototype,"coords",null),(0,r._)([(0,c.MZ)({type:ve.A})],Me.prototype,"extent",void 0),(0,r._)([(0,c.MZ)({type:Number})],Me.prototype,"rotation",void 0),Me=(0,r._)([(0,p.$)("esri.layers.support.ExtentAndRotationGeoreference")],Me);const be=Me;n(59456);var Se=n(21325);function Ae(e,t){const n=(0,m.aB)(t);return function(e){return"media"===e?.type}(e)&&!!e.portalItem&&null!=n&&n>m.Gr.PORTAL_ITEM}const Ie={key:"type",base:$,typeMap:{"control-points":le,corners:ge,"extent-and-rotation":be}},Pe={key:"type",base:$,typeMap:{"control-points":le}};let Le=class extends((0,de.PH)((0,a.P)(me.A))){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return le.fromJSON(e)}writeGeoreference(e,t,n,r){const i=r?.resources?.pendingOperations,o=()=>{const i=function(e,t,n){if(!e||"control-points"===e.type)return e;const{coords:r}=e;if(5!==r?.rings[0]?.length)return null;const[i,o,s,a]=r.rings[0],{spatialReference:l}=r;return new le({controlPoints:[{mapPoint:new G.A({x:i[0],y:i[1],spatialReference:l}),sourcePoint:(0,B.tc)(0,n)},{mapPoint:new G.A({x:o[0],y:o[1],spatialReference:l}),sourcePoint:(0,B.tc)(0,0)},{mapPoint:new G.A({x:s[0],y:s[1],spatialReference:l}),sourcePoint:(0,B.tc)(t,0)},{mapPoint:new G.A({x:a[0],y:a[1],spatialReference:l}),sourcePoint:(0,B.tc)(t,n)}],width:t,height:n})}(this.georeference,this.contentWidth,this.contentHeight);i&&("control-points"!==e.type&&s.A.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),t[n]=i.write({},r))};if("control-points"!==e.type&&!this.loaded&&i)return t[n]={},void i.push(this.load().then(o));o()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){const{georeference:t,contentWidth:n,contentHeight:r}=this;if(null==e||null==t||0===n||0===r)return null;const i=t.toSourceNormalized(e);return null==i?null:(i.x*=n,i.y*=r,i)}};(0,r._)([(0,c.MZ)({types:Ie,json:{write:!0,types:Pe}})],Le.prototype,"georeference",void 0),(0,r._)([(0,h.w)("georeference")],Le.prototype,"readGeoreference",null),(0,r._)([(0,d.K)("georeference")],Le.prototype,"writeGeoreference",null),(0,r._)([(0,c.MZ)({json:{read:!1,write:!1}})],Le.prototype,"opacity",void 0),Le=(0,r._)([(0,p.$)("esri.layers.support.MediaElementBase")],Le);const Te=Le;var Oe=n(85648),Ee=n(97159);let Re=class extends Te{constructor(e){super(e),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this.image=null}load(){const e=this.image;if("string"==typeof e){const t=(0,ue.M5)(e).then((e=>{this._set("content",e)}));this.addResolvingPromise(t)}else if(e instanceof HTMLImageElement){const t=e.decode().then((()=>{this._set("content",e)}));this.addResolvingPromise(t)}else e?this._set("content",e):this.addResolvingPromise(Promise.reject(new o.A("image-element:invalid-image-type","Invalid image type",{image:e})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(e,t,n){return(0,Ee.f)(t.url,n)}writeImage(e,t,n,r){if(null==e)return;const i=r?.portalItem,o=r?.resources;if(!i||!o)return void("string"==typeof e&&(t[n]=(0,Ee.t)(e,r)));const s=function(e){return"string"==typeof e&&!(0,he.DB)(e)&&!(0,he.w8)(e)}(e)?e:null;if(s){if(null==(0,Ee.i)(s))return void(t[n]=s);const e=(0,Ee.t)(s,{...r,verifyItemRelativeUrls:r?.verifyItemRelativeUrls?{writtenUrls:r.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},Ee.M.NO);if(i&&e&&!(0,he.oP)(e))return o.toKeep.push({resource:i.resourceFromPath(e),compress:!1}),void(t[n]=e)}t[n]="<pending>",o.pendingOperations.push(async function(e){return"string"==typeof e?(0,he.DB)(e)?(0,he.N9)(e):(await(0,ce.A)(e,{responseType:"blob"})).data:new Promise((t=>function(e){if(e instanceof HTMLCanvasElement)return e;const t=e instanceof HTMLImageElement?e.naturalWidth:e.width,n=e instanceof HTMLImageElement?e.naturalHeight:e.height,r=document.createElement("canvas"),i=r.getContext("2d");return r.width=t,r.height=n,e instanceof HTMLImageElement?i.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&i.putImageData(e,0,0),r}(e).toBlob(t)))}(e).then((e=>{const r=function(e,t){const n=(0,pe.lk)(),r=`${(0,he.fj)("media",n)}.${(0,Oe.n)({type:"blob",blob:e})}`;return t.resourceFromPath(r)}(e,i);t[n]=r.itemRelativeUrl,o.toAdd.push({resource:r,content:{type:"blob",blob:e},compress:!1,finish:e=>{this.image=e.url}})})))}write(e,t){const n=super.write(e,t);return"mediaType"in n&&!n.url&&delete n.mediaType,n}};(0,r._)([(0,c.MZ)()],Re.prototype,"animationOptions",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],Re.prototype,"content",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],Re.prototype,"contentWidth",null),(0,r._)([(0,c.MZ)({readOnly:!0})],Re.prototype,"contentHeight",null),(0,r._)([(0,c.MZ)({json:{name:"url",type:String,write:{overridePolicy:(e,t,n)=>({enabled:!Ae(n?.layer,n?.origin)})}}})],Re.prototype,"image",void 0),(0,r._)([(0,h.w)("image",["url"])],Re.prototype,"readImage",null),(0,r._)([(0,d.K)("image")],Re.prototype,"writeImage",null),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:{target:"mediaType",ignoreOrigin:!0}}})],Re.prototype,"type",void 0),Re=(0,r._)([(0,p.$)("esri.layers.support.ImageElement")],Re);const Be=Re;var Ze=n(62885),Ge=n(65529),Ce=n(61893),je=n(36708),Ue=n(19419),Ne=n(12176),$e=n(6518),Ye=n(69622),De=n(537),Xe=n(95108),He=n(65864),Fe=n(80754);function Ve(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,Fe.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,Fe.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,Fe.kd)(r,t);e.x+=n*(-2*t)}else if(r<n){const t=(0,Fe.kd)(r,n);e.x+=t*(-2*n)}}return e}function We(e,t){const n=[],{ymin:r,ymax:i,xmin:o,xmax:s}=e,a=e.xmax-e.xmin,[l,c]=t.valid,{x:u,frameId:h}=ze(e.xmin,t),{x:p,frameId:d}=ze(e.xmax,t),m=u===p&&a>0;if(a>2*c){const e={xmin:o<s?u:p,ymin:r,xmax:c,ymax:i},t={xmin:l,ymin:r,xmax:o<s?p:u,ymax:i},a={xmin:0,ymin:r,xmax:c,ymax:i},m={xmin:l,ymin:r,xmax:0,ymax:i},f=[],y=[];ke(e,a)&&f.push(h),ke(e,m)&&y.push(h),ke(t,a)&&f.push(d),ke(t,m)&&y.push(d);for(let e=h+1;e<d;e++)f.push(e),y.push(e);n.push(new Je(e,[h]),new Je(t,[d]),new Je(a,f),new Je(m,y))}else u>p||m?n.push(new Je({xmin:u,ymin:r,xmax:c,ymax:i},[h]),new Je({xmin:l,ymin:r,xmax:p,ymax:i},[d])):n.push(new Je({xmin:u,ymin:r,xmax:p,ymax:i},[h]));return n}function ze(e,t){const[n,r]=t.valid,i=2*r;let o,s=0;return e>r?(o=Math.ceil(Math.abs(e-r)/i),e-=o*i,s=o):e<n&&(o=Math.ceil(Math.abs(e-n)/i),e+=o*i,s=-o),{x:e,frameId:s}}function ke(e,t){const{xmin:n,ymin:r,xmax:i,ymax:o}=t;return qe(e,n,r)&&qe(e,n,o)&&qe(e,i,o)&&qe(e,i,r)}function qe(e,t,n){return t>=e.xmin&&t<=e.xmax&&n>=e.ymin&&n<=e.ymax}function Ke(e,t,n=!0){const r=!(0,He.Rg)(e);if(r&&(0,Xe.m3)(e),n)return(new et).cut(e,t);const i=r?e.rings:e.paths,o=r?4:2,s=i.length,a=-2*t;for(let e=0;e<s;e++){const t=i[e];if(t&&t.length>=o){const e=[];for(const n of t)e.push([n[0]+a,n[1]]);i.push(e)}}return r?e.rings=i:e.paths=i,e}class Je{constructor(e,t){this.extent=e,this.frameIds=t}}const Qe=(0,Ue.vt)();class et{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let n;if(this._xCut=t,e.rings)this._closed=!0,n=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,n=e.paths,this._minPts=2}for(const e of n){if(!e||e.length<this._minPts)continue;let t=!0;for(const n of e)t?(this.moveTo(n),t=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const e of this._linesIn)e&&e.length>=this._minPts&&n.push(e);const r=-2*this._xCut;for(const e of this._linesOut)if(e&&e.length>=this._minPts){for(const t of e)t[0]+=r;n.push(e)}return this._closed?e.rings=n:e.paths=n,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e[0],e[1],this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){const t=this._side(e[0]);if(t*this._prevSide==-1){const n=this._intersect(this._prevPt,e);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(e[0],e[1],t)}else this._lineTo(e[0],e[1],t);this._prevSide=t,this._prevPt=e}close(){const e=this._firstPt,t=this._prevPt;e[0]===t[0]&&e[1]===t[1]||this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t,n){this._closed?(this._lineIn.push([n<=0?e:this._xCut,t]),this._lineOut.push([n>=0?e:this._xCut,t])):(n<=0&&this._lineIn.push([e,t]),n>=0&&this._lineOut.push([e,t]))}_lineTo(e,t,n){this._closed?(tt(this._lineIn,n<=0?e:this._xCut,t),tt(this._lineOut,n>=0?e:this._xCut,t)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([e,t])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([e,t])):this._prevSide<0?(this._lineIn.push([e,t]),this._lineOut.push([e,t])):this._prevSide>0&&(this._lineOut.push([e,t]),this._lineIn.push([e,t]))}_checkClosingPt(e){const t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0][1]=e[t-2][1],e.pop())}_side(e){return e<this._xCut?-1:e>this._xCut?1:0}_intersect(e,t){const n=(this._xCut-e[0])/(t[0]-e[0]);return e[1]+n*(t[1]-e[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function tt(e,t,n){const r=e.length;r>1&&e[r-1][0]===t&&e[r-2][0]===t?e[r-1][1]=n:e.push([t,n])}let nt=class extends Ye.A{constructor(e){super(e)}get bounds(){const e=this.coords;return null==e?.extent?null:(0,Ue.VY)(e.extent)}get coords(){const e=this.element.georeference?.coords;return(0,j.projectOrLoad)(e,this.spatialReference).geometry}get normalizedCoords(){return C.A.fromJSON(function(e,t){if(null==e)return null;const n=e.spatialReference,r=(0,Se.Vp)(n),i=(0,M.Wj)(e)?e.toJSON():e;if(!r)return i;const o=(0,Se.K8)(n)?102100:4326,s=Fe.j7[o].maxX,a=Fe.j7[o].minX;if((0,He.fT)(i))return Ve(i,s,a);if((0,He.U9)(i))return i.points=i.points.map((e=>Ve(e,s,a))),i;if((0,He.ZC)(i))return function(e,t){if(!t)return e;const n=We(e,t).map((e=>e.extent));return n.length<2?n[0]||e:n.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:n.map((e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]))}}(i,r);if((0,He.Bi)(i)||(0,He.Rg)(i)){const e=(0,De.Rg)(Qe,i),n={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},r=(0,Fe.kd)(n.xmin,a)*(2*s),o=0===r?i:(0,Fe.kS)(i,r);return n.xmin+=r,n.xmax+=r,n.xmax>s?Ke(o,s,t):n.xmin<a?Ke(o,a,t):o}return i}(this.coords,!0))}get normalizedBounds(){const e=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=e?(0,Ue.VY)(e):null}};(0,r._)([(0,c.MZ)()],nt.prototype,"spatialReference",void 0),(0,r._)([(0,c.MZ)()],nt.prototype,"element",void 0),(0,r._)([(0,c.MZ)()],nt.prototype,"bounds",null),(0,r._)([(0,c.MZ)()],nt.prototype,"coords",null),(0,r._)([(0,c.MZ)()],nt.prototype,"normalizedCoords",null),(0,r._)([(0,c.MZ)()],nt.prototype,"normalizedBounds",null),nt=(0,r._)([(0,p.$)("esri.layers.support.MediaElementView")],nt);var rt=n(37955);let it=class extends Te{constructor(e){super(e),this.autoplay=!0,this.content=null,this.type="video"}load(){const e=this.video;if("string"==typeof e){const t=document.createElement("video");t.src=e,t.crossOrigin="anonymous",t.autoplay=!0,t.muted=!0,t.loop=!0,t.playsInline=!0,this.addResolvingPromise(this._loadVideo(t).then((()=>{this._set("content",t)})))}else e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then((()=>{this._set("content",e)}))):this.addResolvingPromise(Promise.reject(new o.A("video-element:invalid-video-type","Invalid video type",{video:e})));return Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}set video(e){"not-loaded"===this.loadStatus?this._set("video",e):s.A.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}_loadVideo(e){return new Promise(((t,n)=>{const r=(0,rt.Oo)(e,"canplay",(()=>{this.removeHandles("canplay"),this.autoplay?e.play().then(t,n):t()}));this.addHandles(r,"canplay"),"anonymous"!==e.crossOrigin&&(e.crossOrigin="anonymous",e.src?.includes("blob:")||(e.src=e.src))}))}};(0,r._)([(0,c.MZ)()],it.prototype,"autoplay",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],it.prototype,"content",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],it.prototype,"contentWidth",null),(0,r._)([(0,c.MZ)({readOnly:!0})],it.prototype,"contentHeight",null),(0,r._)([(0,c.MZ)()],it.prototype,"video",null),it=(0,r._)([(0,p.$)("esri.layers.support.VideoElement")],it);const ot=it,st={key:"type",defaultKeyValue:"image",base:Te,typeMap:{image:Be,video:ot}},at=i.A.ofType(st);let lt=class extends(me.A.LoadableMixin((0,Ce.g)(Ge.A.EventedAccessor))){constructor(e){super(e),this._index=new $e.F,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=e=>{for(const t of e.removed){const e=this._elementViewsMap.get(t);this._elementViewsMap.delete(t),this._index.delete(e),this.removeHandles(e),e.destroy(),this.notifyChange("fullExtent")}const{spatialReference:t}=this;for(const n of e.added){if(this._elementViewsMap.get(n))continue;const e=new nt({spatialReference:t,element:n});this._elementViewsMap.set(n,e);const r=(0,je.wB)((()=>e.coords),(()=>this._updateIndexForElement(e,!1)));this._updateIndexForElement(e,!0),this.addHandles(r,e)}this._elementsIndexes.clear(),this.elements.forEach(((e,t)=>this._elementsIndexes.set(e,t))),this.emit("refresh")},this.elements=new at}async load(e){if((0,l.Te)(e),!this.spatialReference){const e=this.elements.find((e=>null!=e.georeference?.coords));this._set("spatialReference",e?e.georeference.coords.spatialReference:U.A.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(e){this._set("elements",(0,Ze.V)(e,this._get("elements"),at))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const e=this._index.fullBounds;return null==e?null:new ve.A({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:this.spatialReference})}set spatialReference(e){"not-loaded"===this.loadStatus?this._set("spatialReference",e):s.A.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(e,t){await this.load(),await(0,j.initializeProjection)(e.spatialReference,this.spatialReference,null,t);const n=(0,Se.aI)(e.spatialReference,this.spatialReference)?e:(0,j.project)(e,this.spatialReference);if(!n)return[];const r=n.normalize(),i=[];for(const e of r)this._index.forEachInBounds((0,Ue.VY)(e),(({normalizedCoords:t,element:n})=>{null!=t&&(0,Ne.fA)(e,t)&&i.push(n)}));return i.sort(((e,t)=>this._elementsIndexes.get(e)-this._elementsIndexes.get(t))),i}hasElement(e){return this.elements.includes(e)}_updateIndexForElement(e,t){const n=e.normalizedBounds,r=this._index.has(e),i=null!=n;this._index.delete(e),i&&this._index.set(e,n),this.notifyChange("fullExtent"),t||(r!==i?this.emit("refresh"):this.emit("change",{element:e.element}))}};(0,r._)([(0,c.MZ)()],lt.prototype,"elements",null),(0,r._)([(0,c.MZ)({readOnly:!0})],lt.prototype,"fullExtent",null),(0,r._)([(0,c.MZ)()],lt.prototype,"spatialReference",null),lt=(0,r._)([(0,p.$)("esri.layers.support.LocalMediaElementSource")],lt);const ct=lt;var ut=n(92935);function ht(e){return"object"==typeof e&&null!=e&&"type"in e}function pt(e){return ht(e)&&"image"===e.type}let dt=class extends((0,y.dM)((0,x.j)((0,g.q)((0,_.A)((0,a.P)(f.A)))))){constructor(e){super(e),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=(0,l.sg)((async(e,t,r)=>{const{save:i,saveAs:o}=await n.e(3561).then(n.bind(n,63561));switch(e){case ut.X.SAVE:return i(this,t);case ut.X.SAVE_AS:return o(this,r,t)}})),this.source=new ct}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.loadFromPortal({supportedTypes:["Media Layer"]},e);let t=this.source;if(!t)throw new o.A("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");const n=this._getSourceOverride(t,this.georeference);n&&(this.setAtOrigin("source",n,"web-map"),this.setAtOrigin("source",n,"web-scene"),t=n);const r=ht(t)?new ct({elements:new i.A([t])}):t;this._set("effectiveSource",r),this.spatialReference&&(r.spatialReference=this.spatialReference),await r.load(e),this.spatialReference=r.spatialReference}destroy(){this.effectiveSource?.destroy(),this.effectiveSource!==this.source&&this.source?.destroy()}readGeoreference(e,t){return e&&"itemId"in t&&t.itemId?e:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}set source(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("source",e):s.A.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(e){return e?Array.isArray(e)?new ct({elements:new i.A(e)}):e instanceof i.A?new ct({elements:e}):e:null}readSource(e,t,n){if("itemId"in t&&t.itemId)return;const r=this._createSource(t);return r?.read(t,n),r}writeSource(e,t,n,r){if(e&&e instanceof ct){const t=e.elements.length;if(1!==t)return void(r?.messages&&r.messages.push(new o.A("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${t}.`)));e=e.elements.at(0)}pt(e)?e.write(t,r):r?.messages&&(e?r.messages.push(new o.A("media-layer:unsupported-source","only media elements of type 'ImageElement' can be persisted")):r.messages.push(new o.A("media-layer:unsupported-source","the media layer is missing a source")))}async save(e){return this._debouncedSaveOperations(ut.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(ut.X.SAVE_AS,t,e)}_createSource(e){if("mediaType"in e)switch(e.mediaType){case"image":return new Be;case"video":return new ot}return null}_getSourceOverride(e,t){if(ht(e)&&this.originIdOf("source")===m.Gr.PORTAL_ITEM&&t&&(this.originIdOf("georeference")===m.Gr.WEB_MAP||this.originIdOf("georeference")===m.Gr.WEB_SCENE)){const n=e.toJSON(),r=this._createSource(n);return r.read({...n},{origin:"portal-item"}),r.read({georeference:t},{origin:"web-map"}),r.read({georeference:t},{origin:"web-scene"}),r}return null}};(0,r._)([(0,c.MZ)({readOnly:!0})],dt.prototype,"effectiveSource",void 0),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],dt.prototype,"georeference",void 0),(0,r._)([(0,h.w)("web-document","georeference")],dt.prototype,"readGeoreference",null),(0,r._)([(0,c.MZ)({type:String})],dt.prototype,"copyright",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],dt.prototype,"fullExtent",null),(0,r._)([(0,c.MZ)({type:["MediaLayer"]})],dt.prototype,"operationalLayerType",void 0),(0,r._)([(0,c.MZ)({type:["show","hide"]})],dt.prototype,"listMode",void 0),(0,r._)([(0,c.MZ)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image"]},georeference:{type:le}},overridePolicy(e,t,n){return{enabled:!0,allowNull:!1,ignoreOrigin:Ae(this,n?.origin)&&pt(e)&&!!e.georeference&&e.originIdOf("georeference")>m.Gr.PORTAL_ITEM}}}}})],dt.prototype,"source",null),(0,r._)([(0,u.w)("source")],dt.prototype,"castSource",null),(0,r._)([(0,h.w)("source",["url"])],dt.prototype,"readSource",null),(0,r._)([(0,d.K)("source")],dt.prototype,"writeSource",null),(0,r._)([(0,c.MZ)()],dt.prototype,"spatialReference",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],dt.prototype,"type",void 0),dt=(0,r._)([(0,p.$)("esri.layers.MediaLayer")],dt);const mt=dt},6518:(e,t,n)=>{n.d(t,{F:()=>a});var r=n(44208),i=n(75503),o=n(19419);const s={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.w(9,(0,r.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((n,r)=>{e[t++]=r})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,o.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,n)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},16131:(e,t,n)=>{n.d(t,{q:()=>v});var r=n(90237),i=n(60945),o=n(49186),s=n(84952),a=n(10107),l=n(56507),c=(n(87811),n(44208),n(36005)),u=n(40608),h=n(43937),p=n(89317),d=n(45917),m=n(49422);const f={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},y={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},g={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},_={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":f,"web-map/basemap":y,"web-map/tables":g,"link-chart/operational-layers":{...f,LinkChartLayer:!0},"link-chart/basemap":y,"link-chart/tables":g,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var x=n(10873);const v=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,n){return"Group Layer"===n?.portalItem?.type?void 0:e}writeListMode(e,t,n,r){(r&&"ground"===r.layerContainerType||e&&(0,m.R)(this,n,{},r))&&(t[n]=e)}writeOperationalLayerType(e,t,n,r){e&&"tables"!==r?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?i.A.fromArray(e):null}writeTimeExtent(e,t,n,r){e&&"tables"!==r.layerContainerType&&(e.isEmpty?r?.messages&&r.messages.push(new o.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[n]=e.toArray())}read(e,t){t&&(t.layer=this),(0,d.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,n=_[e];let r=!!n?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(r=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(r=!1),!r)return t.messages?.push(new o.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const n=super.write(e,{...t,layer:this}),r=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof o.A&&"web-document-write:property-required"===e.name)).length;return(0,s.w8)(n?.url)?(t?.messages?.push(new o.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&r?null:n}beforeSave(){}};return(0,r._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,r._)([(0,c.w)("id",["id"])],t.prototype,"readId",null),(0,r._)([(0,a.MZ)(x.C1)],t.prototype,"listMode",void 0),(0,r._)([(0,h.K)("listMode")],t.prototype,"writeListMode",null),(0,r._)([(0,a.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:p.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,r._)([(0,h.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,r._)([(0,a.MZ)(x.ke)],t.prototype,"opacity",void 0),(0,r._)([(0,a.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,r._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,r._)([(0,h.K)("title"),(0,h.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,r._)([(0,a.MZ)({type:i.A,json:{origins:{"web-scene":{write:{layerContainerTypes:p.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,c.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,r._)([(0,h.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[l.jz,l.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,r._)([(0,a.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:p.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,r._)([(0,u.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,n)=>{n.d(t,{A:()=>w});var r=n(90237),i=n(92602),o=n(70333),s=n(78888),a=n(60999),l=n(49186),c=n(53966),u=n(97768),h=n(74887),p=n(84952),d=n(10107),m=(n(44208),n(87811),n(36005)),f=n(40608),y=n(43937),g=n(83531),_=n(20655),x=n(80812),v=n(41318),M=n(10407);const w=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,u.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,n){if(t.itemId)return new x.default({id:t.itemId,portal:n?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([n.e(5356),n.e(1204)]).then(n.bind(n,41204));return(0,h.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,h.zf)(e)||c.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(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:n,fullEdit:r},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let n=this.portalItem;if(!e||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===n.id;if(r&&n.portal.user)return(0,M.It)(n);let i,s;if(r)i=n.portal.url;else try{i=await(0,g.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!i||!(0,p.b8)(i,n.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const a=!0,l=!1,c=!1;if(!s)return{features:{edit:a,fullEdit:l},content:{updateItem:c}};try{if(r?await n.reload():(n=new x.default({id:e,portal:{url:i}}),await n.load(t)),n.portal.user)return(0,M.It)(n)}catch(e){(0,h.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:c}}}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?o.id?.findCredential(this.url):null;if(!t)return!0;const n=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const n=o.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;const r=`${n.owningSystemUrl}/sharing/rest`,i=_.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(r))return i.user;const l=`${r}/community/self`,c=null!=e?e.signal:null,u=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:c}));return u.ok?v.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const n=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return n&&r&&!(0,p.ut)(r.restUrl,n.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,d.MZ)({type:x.default})],t.prototype,"portalItem",null),(0,r._)([(0,m.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,y.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,d.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},b={credential:null,user:null}},85648:(e,t,n)=>{n.d(t,{n:()=>i});var r=n(84952);function i(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,r.Zo)(e);return l[t]||s}(e.url)}(e)]||a}const o={},s="text/plain",a=o[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)o[l[e]]=e},92935:(e,t,n)=>{var r;n.d(t,{X:()=>r}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(r||(r={}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7899,1053,3069],{60945:(e,t,n)=>{n.d(t,{A:()=>f});var r,i=n(90237),o=n(25482),s=n(88930),a=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),c=n(40608),u=n(43937),h=n(56400);let p=r=class extends o.oY{static get allTime(){return d}static get empty(){return m}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===r&&n===i}expandTo(e,t=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,s.lL)(n,e,t));let i=this.end;if(i){const n=(0,s.lL)(i,e,t);i=i.getTime()===n.getTime()?n:(0,s.S1)(n,1,e,t)}return new r({start:n,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,a;return i>=t&&i<=n?s=i:t>=i&&t<=o&&(s=t),n>=i&&n<=o?a=n:o>=t&&o<=n&&(a=o),null==s||null==a||isNaN(s)||isNaN(a)?r.empty:new r({start:s===-1/0?null:new Date(s),end:a===1/0?null:new Date(a)})}offset(e,t,n=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new r,{start:o,end:a}=this;return null!=o&&(i.start=(0,s.S1)(o,e,t,n)),null!=a&&(i.end=(0,s.S1)(a,e,t,n)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,n=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:n})}};(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i._)([(0,l.w)("end")],p.prototype,"readEnd",null),(0,i._)([(0,u.K)("end")],p.prototype,"writeEnd",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i._)([(0,l.w)("start")],p.prototype,"readStart",null),(0,i._)([(0,u.K)("start")],p.prototype,"writeStart",null),p=r=(0,i._)([(0,c.$)("esri.TimeExtent")],p);const d=new p,m=new p({start:void 0,end:void 0}),f=p},11053:(e,t,n)=>{n.d(t,{c:()=>r,g:()=>i});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},11006:(e,t,n)=>{n.d(t,{q:()=>l});var r,i,o,s=n(11053),a={exports:{}};r=a,i=function(){function e(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);e(n,r,Math.max(i,Math.floor(r-l*u/a+h)),Math.min(o,Math.floor(r+(a-l)*u/a+h)),s)}var p=n[r],d=i,m=o;for(t(n,i,r),s(n[o],p)>0&&t(n,i,o);d<m;){for(t(n,d,m),d++,m--;s(n[d],p)<0;)d++;for(;s(n[m],p)>0;)m--}0===s(n[i],p)?t(n,i,m):t(n,++m,o),m<=r&&(i=m+1),r<=m&&(o=m-1)}}function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return e<t?-1:e>t?1:0}return function(t,r,i,o,s){e(t,r,i||0,o||t.length-1,s||n)}},void 0!==(o=i())&&(r.exports=o);const l=(0,s.g)(a.exports)},69540:(e,t,n)=>{n.d(t,{O:()=>u,P:()=>h});var r=n(90237),i=n(69622),o=(n(44208),n(4718)),s=(n(53966),n(97768)),a=n(35666),l=n(88620),c=n(40608);const u=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,s.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,n=e.store,r={},i=new Map;for(const e in t){const s=t[e],l=n?.originOf(e),c=s.clonable;if(s.readOnly||!1===c||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const u=this[e];let h=null;h="function"==typeof c?c(u):"reference"===c?u:(0,o.TU)(u),null!=u&&null==h||(l===a.Gr.DEFAULTS?i.set(e,h):r[e]=h)}const c=new(0,Object.getPrototypeOf(this).constructor)(r);if(i.size){const e=(0,l.oY)(c)?.store;if(e)for(const[t,n]of i)e.set(t,n,a.Gr.DEFAULTS)}return c}};return t=(0,r._)([(0,c.$)("esri.core.Clonable")],t),t};let h=class extends(u(i.A)){};h=(0,r._)([(0,c.$)("esri.core.Clonable")],h)},4902:(e,t,n)=>{n.d(t,{PH:()=>a,sA:()=>s});var r=n(90237),i=n(40608);let o=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return t=(0,r._)([(0,i.$)("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:o++})}};return t=(0,r._)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(s(class{})){};l=(0,r._)([(0,i.$)("esri.core.Identifiable")],l)},92071:(e,t,n)=>{n.d(t,{P:()=>x,L:()=>v});var r=n(90237),i=n(69622),o=n(76953),s=n(4718),a=n(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,n=this._originStores[a.Gr.DEFAULTS];n&&n.forEach(((e,n)=>{t.set(n,(0,s.o8)(e),a.Gr.DEFAULTS)}));for(let n=a.Gr.SERVICE;n<a.AU;n++){const r=this._originStores[n];r&&r.forEach(((r,i)=>{e&&e.has(i)||t.set(i,(0,s.o8)(r),n)}))}return t}get(e,t){const n=void 0===t?this._values:this._originStores[t];return n?n.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,n=a.Gr.USER){let r=this._originStores[n];if(r||(r=new Map,this._originStores[n]=r),r.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=n){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,n),r!==t}return!1}delete(e,t=a.Gr.USER){const n=this._originStores[t];if(!n)return;const r=n.get(e);if(n.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let n=t-1;n>=0;n--){const t=this._originStores[n];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,n);break}}}return r}has(e,t){const n=void 0===t?this._values:this._originStores[t];return!!n&&n.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const n=this._originStores[t],r=n?.get(e),i=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),i!==r}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var c=n(45917),u=n(88620),h=n(40608);const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,u.oY)(this),n=t.store,r=new l;t.store=r,(0,o.k)(t,n,r)}read(e,t){(0,c.L)(this,e,t)}getAtOrigin(e,t){const n=d(this),r=(0,a.aB)(t);if("string"==typeof e)return n.get(e,r);const i={};return e.forEach((e=>{i[e]=n.get(e,r)})),i}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return d(this).originOf(e)}revert(e,t){const n=d(this),r=(0,a.aB)(t),i=(0,u.oY)(this);let o;o="string"==typeof e?"*"===e?n.keys(r):[e]:e,o.forEach((e=>{i.invalidate(e),n.revert(e,r),i.commit(e)}))}};return t=(0,r._)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function d(e){return(0,u.oY)(e).store}let m=class extends(p(i.A)){};m=(0,r._)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],m);var f=n(16649),y=n(49422);const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return _(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,y.M)(this,e=e||{},t),e}setAtOrigin(e,t,n){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(n))}removeOrigin(e){const t=_(this),n=(0,a.aB)(e),r=t.keys(n);for(const e of r)t.originOf(e)===n&&t.set(e,t.get(e,n),a.Gr.USER)}updateOrigin(e,t){const n=_(this),r=(0,a.aB)(t),i=(0,f.Jt)(this,e);for(let t=r+1;t<a.AU;++t)n.delete(e,t);n.set(e,i,r)}toJSON(e){return this.write({},e)}};return t=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function _(e){return(0,u.oY)(e).store}const x=e=>{let t=class extends(g(p(e))){constructor(...e){super(...e)}};return t=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport")],t),t};let v=class extends(x(i.A)){};v=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport")],v)},43668:(e,t,n)=>{n.d(t,{M5:()=>h,eV:()=>u});var r=n(78888),i=n(49186),o=n(74887),s=n(84952),a=n(26306);let l=null,c=!0;function u(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,n)}catch(e){c=!1}const i=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function h(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,a.M)(n.data),mediaType:n.mediaType};const i=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(n.bind(n,10820));if(e(l))return r(l,t)}if(u){const{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(n.bind(n,22390));if(e(l))return r(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,o.zf)(e))throw new i.A("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),t)}},29242:(e,t,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function i(e,t,n,r,i,o,s,a,l){return[e,t,n,r,i,o,s,a,l]}n.d(t,{fA:()=>i,vt:()=>r,zK:()=>o});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:r,createView:function(e,t){return new Float64Array(e,t,9)},fromValues:i},Symbol.toStringTag,{value:"Module"}))},48163:(e,t,n)=>{function r(){return[0,0]}function i(e,t){return[e,t]}function o(){return i(1,1)}function s(){return i(1,0)}function a(){return i(0,1)}n.d(t,{Un:()=>l,fA:()=>i,vt:()=>r});const l=o(),c=s(),u=a();Object.freeze(Object.defineProperty({__proto__:null,ONES:l,UNIT_X:c,UNIT_Y:u,ZEROS:[0,0],clone:function(e){return[e[0],e[1]]},create:r,createView:function(e,t){return new Float64Array(e,t,2)},fromArray:function(e,t=[0,0]){const n=Math.min(2,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t},fromValues:i,ones:o,unitX:s,unitY:a,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},77690:(e,t,n)=>{n.d(t,{B8:()=>a,Ge:()=>p,I0:()=>h,KC:()=>l,hZ:()=>o,hs:()=>u,lw:()=>c,mg:()=>s,z0:()=>i});var r=n(34304);function i(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function o(e,t,n,r,i,o,s,a,l,c){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=s,e[6]=a,e[7]=l,e[8]=c,e}function s(e,t){if(e===t){const n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function a(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=u*s-a*c,p=-u*o+a*l,d=c*o-s*l;let m=n*h+r*p+i*d;return m?(m=1/m,e[0]=h*m,e[1]=(-u*r+i*c)*m,e[2]=(a*r-i*s)*m,e[3]=p*m,e[4]=(u*n-i*l)*m,e[5]=(-a*n+i*o)*m,e[6]=d*m,e[7]=(-c*n+r*l)*m,e[8]=(s*n-r*o)*m,e):null}function l(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8];return e[0]=s*u-a*c,e[1]=i*c-r*u,e[2]=r*a-i*s,e[3]=a*l-o*u,e[4]=n*u-i*l,e[5]=i*o-n*a,e[6]=o*c-s*l,e[7]=r*l-n*c,e[8]=n*s-r*o,e}function c(e,t,n){const r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],p=n[0],d=n[1],m=n[2],f=n[3],y=n[4],g=n[5],_=n[6],x=n[7],v=n[8];return e[0]=p*r+d*s+m*c,e[1]=p*i+d*a+m*u,e[2]=p*o+d*l+m*h,e[3]=f*r+y*s+g*c,e[4]=f*i+y*a+g*u,e[5]=f*o+y*l+g*h,e[6]=_*r+x*s+v*c,e[7]=_*i+x*a+v*u,e[8]=_*o+x*l+v*h,e}function u(e,t,n){const r=n[0],i=n[1],o=n[2];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=o*t[6],e[7]=o*t[7],e[8]=o*t[8],e}function h(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=n+n,a=r+r,l=i+i,c=n*s,u=r*s,h=r*a,p=i*s,d=i*a,m=i*l,f=o*s,y=o*a,g=o*l;return e[0]=1-h-m,e[3]=u-g,e[6]=p+y,e[1]=u+g,e[4]=1-c-m,e[7]=d-f,e[2]=p-y,e[5]=d+f,e[8]=1-c-h,e}function p(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=t[9],p=t[10],d=t[11],m=t[12],f=t[13],y=t[14],g=t[15],_=n*a-r*s,x=n*l-i*s,v=n*c-o*s,M=r*l-i*a,w=r*c-o*a,b=i*c-o*l,S=u*f-h*m,A=u*y-p*m,I=u*g-d*m,P=h*y-p*f,L=h*g-d*f,T=p*g-d*y;let O=_*T-x*L+v*P+M*I-w*A+b*S;return O?(O=1/O,e[0]=(a*T-l*L+c*P)*O,e[1]=(l*I-s*T-c*A)*O,e[2]=(s*L-a*I+c*S)*O,e[3]=(i*L-r*T-o*P)*O,e[4]=(n*T-i*I+o*A)*O,e[5]=(r*I-n*L-o*S)*O,e[6]=(f*b-y*w+g*M)*O,e[7]=(y*v-m*b-g*x)*O,e[8]=(m*w-f*v+g*_)*O,e):null}function d(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e}const m=c,f=d;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e},adjoint:l,copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},determinant:function(e){const t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8];return t*(c*o-s*l)+n*(-c*i+s*a)+r*(l*i-o*a)},equals:function(e,t){const n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],p=t[0],d=t[1],m=t[2],f=t[3],y=t[4],g=t[5],_=t[6],x=t[7],v=t[8],M=(0,r.FD)();return Math.abs(n-p)<=M*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(i-d)<=M*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-m)<=M*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(s-f)<=M*Math.max(1,Math.abs(s),Math.abs(f))&&Math.abs(a-y)<=M*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(l-g)<=M*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(c-_)<=M*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(u-x)<=M*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(h-v)<=M*Math.max(1,Math.abs(h),Math.abs(v))},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2)},fromMat2d:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e},fromMat4:i,fromQuat:h,fromRotation:function(e,t){const n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromTranslation:function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e},identity:function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},invert:a,isOrthoNormal:function(e){const t=(0,r.FD)(),n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8];return Math.abs(1-(n*n+s*s+c*c))<=t&&Math.abs(1-(i*i+a*a+u*u))<=t&&Math.abs(1-(o*o+l*l+h*h))<=t},mul:m,multiply:c,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e},normalFromMat4:p,normalFromMat4Legacy:function(e,t){const n=t[0],r=t[1],i=t[2],o=t[4],s=t[5],a=t[6],l=t[8],c=t[9],u=t[10],h=u*s-a*c,p=-u*o+a*l,d=c*o-s*l,m=n*h+r*p+i*d;if(!m)return null;const f=1/m;return e[0]=h*f,e[1]=(-u*r+i*c)*f,e[2]=(a*r-i*s)*f,e[3]=p*f,e[4]=(u*n-i*l)*f,e[5]=(-a*n+i*o)*f,e[6]=d*f,e[7]=(-c*n+r*l)*f,e[8]=(s*n-r*o)*f,e},projection:function(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e},rotate:function(e,t,n){const r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],p=Math.sin(n),d=Math.cos(n);return e[0]=d*r+p*s,e[1]=d*i+p*a,e[2]=d*o+p*l,e[3]=d*s-p*r,e[4]=d*a-p*i,e[5]=d*l-p*o,e[6]=c,e[7]=u,e[8]=h,e},scale:u,scaleByVec2:function(e,t,n){const r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e},set:o,str:function(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"},sub:f,subtract:d,translate:function(e,t,n){const r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],p=n[0],d=n[1];return e[0]=r,e[1]=i,e[2]=o,e[3]=s,e[4]=a,e[5]=l,e[6]=p*r+d*s+c,e[7]=p*i+d*a+u,e[8]=p*o+d*l+h,e},transpose:s},Symbol.toStringTag,{value:"Module"}))},37585:(e,t,n)=>{n.d(t,{Cc:()=>f,Io:()=>u,S8:()=>m,WQ:()=>o,e$:()=>g,hZ:()=>i,hs:()=>c,jb:()=>x,l0:()=>y});var r=n(34304);function i(e,t,n){return e[0]=t,e[1]=n,e}function o(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function s(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function a(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function l(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function c(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function u(e,t){const n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}function h(e,t){const n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function p(e){const t=e[0],n=e[1];return Math.sqrt(t*t+n*n)}function d(e){const t=e[0],n=e[1];return t*t+n*n}function m(e,t){const n=t[0],r=t[1];let i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i),e}function f(e,t,n,r){const i=t[0],o=t[1];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e}function y(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function g(e,t,n,r){const i=t[0]-n[0],o=t[1]-n[1],s=Math.sin(r),a=Math.cos(r);return e[0]=i*a-o*s+n[0],e[1]=i*s+o*a+n[1],e}const _=p,x=s,v=a,M=l,w=u,b=h,S=d;Object.freeze(Object.defineProperty({__proto__:null,add:o,angle:function(e,t){const n=e[0],r=e[1],i=t[0],o=t[1];let s=n*n+r*r;s>0&&(s=1/Math.sqrt(s));let a=i*i+o*o;a>0&&(a=1/Math.sqrt(a));const l=(n*i+r*o)*s*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e},cross:function(e,t,n){const r=t[0]*n[1]-t[1]*n[0];return e[0]=e[1]=0,e[2]=r,e},dist:w,distance:u,div:M,divide:l,dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},equals:function(e,t){const n=e[0],i=e[1],o=t[0],s=t[1],a=(0,r.FD)();return Math.abs(n-o)<=a*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-s)<=a*Math.max(1,Math.abs(i),Math.abs(s))},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e},len:_,length:p,lerp:f,max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e},mul:v,multiply:a,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},normalize:m,projectAndScale:function(e,t,n,r,i){let o=t[0]-n[0],s=t[1]-n[1];const a=(r[0]*o+r[1]*s)*(i-1);return o=r[0]*a,s=r[1]*a,e[0]=t[0]+o,e[1]=t[1]+s,e},random:function(e,t){t=t||1;const n=2*(0,r.Ov)()*Math.PI;return e[0]=Math.cos(n)*t,e[1]=Math.sin(n)*t,e},rotate:g,round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e},scale:c,scaleAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e},set:i,sqrDist:b,sqrLen:S,squaredDistance:h,squaredLength:d,str:function(e){return"vec2("+e[0]+", "+e[1]+")"},sub:x,subtract:s,transformMat2:function(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e},transformMat2d:y,transformMat3:function(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[3]*i+n[6],e[1]=n[1]*r+n[4]*i+n[7],e},transformMat4:function(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e}},Symbol.toStringTag,{value:"Module"}))},75503:(e,t,n)=>{n.d(t,{w:()=>s});var r=n(4576),i=(n(44208),n(3694)),o=n(11006);class s{constructor(e=9,t){this._compareMinX=h,this._compareMinY=p,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),v.prune(),M.prune(),w.prune(),b.prune()}all(e){a(this._data,e)}search(e,t){let n=this._data;const r=this._toBBox;if(_(e,n))for(v.clear();n;){for(let i=0,o=n.children.length;i<o;i++){const o=n.children[i],s=n.leaf?r(o):o;_(e,s)&&(n.leaf?t(o):g(e,s)?a(o,t):v.push(o))}n=v.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!_(e,t))return!1;for(v.clear();t;){for(let r=0,i=t.children.length;r<i;r++){const i=t.children[r],o=t.leaf?n(i):i;if(_(e,o)){if(t.leaf||g(e,o))return!0;v.push(i)}}t=v.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,n=this._data,i=null,o=0,s=!1;const a=this._toBBox(e);for(w.clear(),b.clear();n||w.length>0;){if(n||(n=w.pop(),i=w.data[w.length-1],o=b.pop()??0,s=!0),n.leaf&&(t=(0,r.qh)(n.children,e,n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),w.push(n),this._condense(w),this;s||n.leaf||!g(n,a)?i?(o++,n=i.children[o],s=!1):n=null:(w.push(n),b.push(o),o=0,i=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,r){const i=n-t+1;let o=this._maxEntries;if(i<=o){const r=new I(e.slice(t,n+1));return l(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/o**(r-1)));const s=new P([]);s.height=r;const a=Math.ceil(i/o),c=a*Math.ceil(Math.sqrt(o));x(e,t,n,c,this._compareMinX);for(let i=t;i<=n;i+=c){const t=Math.min(i+c-1,n);x(e,i,t,a,this._compareMinY);for(let n=i;n<=t;n+=a){const i=Math.min(n+a-1,t);s.children.push(this._build(e,n,i,r-1))}}return l(s,this._toBBox),s}_insert(e,t,n){const r=this._toBBox,i=n?e:r(e);w.clear();const o=function(e,t,n,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=d(s),l=f(e,s)-a;l<i?(i=l,r=a<r?a:r,n=s):l===i&&a<r&&(r=a,n=s)}t=n||t.children[0]}return t}(i,this._data,t,w);for(o.children.push(e),u(o,i);t>=0&&w.data[t].children.length>this._maxEntries;)this._split(w,t),t--;!function(e,t,n){for(let r=n;r>=0;r--)u(t.data[r],e)}(i,w,t)}_split(e,t){const n=e.data[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const o=this._chooseSplitIndex(n,i,r);if(!o)return;const s=n.children.splice(o,n.children.length-o),a=n.leaf?new I(s):new P(s);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new P([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,i,o;r=i=1/0;for(let s=t;s<=n-t;s++){const t=c(e,0,s,this._toBBox),a=c(e,s,n,this._toBBox),l=y(t,a),u=d(t)+d(a);l<r?(r=l,o=s,i=u<i?u:i):l===r&&u<i&&(i=u,o=s)}return o}_chooseSplitAxis(e,t,n){const r=e.leaf?this._compareMinX:h,i=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const i=this._toBBox,o=c(e,0,t,i),s=c(e,n-t,n,i);let a=m(o)+m(s);for(let r=t;r<n-t;r++){const t=e.children[r];u(o,e.leaf?i(t):t),a+=m(o)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];u(s,e.leaf?i(t):t),a+=m(s)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const i=e.data[t-1],o=i.children;o.splice((0,r.qh)(o,n,o.length,i.indexHint),1)}else this.clear();else l(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let n=e;for(M.clear();n;){if(!0===n.leaf)for(const e of n.children)t(e);else M.pushArray(n.children);n=M.pop()??null}}function l(e,t){c(e,0,e.children.length,t,e)}function c(e,t,n,r,i){i||(i=new I([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o,s=t;s<n;s++)o=e.children[s],u(i,e.leaf?r(o):o);return i}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,n,r,i){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=r)continue;const a=n+Math.ceil((t-n)/r/2)*r;(0,o.q)(e,a,n,t,i),s.push(n,a,a,t)}}const v=new i.A,M=new i.A,w=new i.A,b=new i.A({deallocator:void 0});class S{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends S{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class I extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class P extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},36708:(e,t,n)=>{n.d(t,{C_:()=>p,OH:()=>f,Vh:()=>y,on:()=>h,pc:()=>g,wB:()=>l,z7:()=>c}),n(60999),n(5503);var r=n(37955),i=n(36563),o=n(97768),s=n(74887),a=n(14012);function l(e,t,n={}){return u(e,t,n,d)}function c(e,t,n={}){return u(e,t,n,m)}function u(e,t,n={},r){let i=null;const s=n.once?(e,n)=>{r(e)&&((0,o.xt)(i),t(e,n))}:(e,n)=>{r(e)&&t(e,n)};if(i=(0,a.Cn)(e,s,n.sync,n.equals),n.initial){const t=e();s(t,t)}return i}function h(e,t,n,s={}){let a=null,c=null,u=null;function h(){a&&c&&(c.remove(),s.onListenerRemove?.(a),a=null,c=null)}function p(e){s.once&&s.once&&(0,o.xt)(u),n(e)}const d=l(e,((e,n)=>{h(),(0,r.wb)(e)&&(a=e,c=(0,r.on)(e,t,p),s.onListenerAdd?.(e))}),{sync:s.sync,initial:!0});return u=(0,i.hA)((()=>{d.remove(),h()})),u}function p(e,t){return function(e,t,n){if((0,s.G4)(n))return Promise.reject((0,s.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,o.xt)(a)}return new Promise(((r,o)=>{a=(0,i.vE)([(0,s.u7)(n,(()=>{l(),o((0,s.NK)())})),u(e,(e=>{l(),r(e)}),{sync:!1,once:!0},t??d)])}))}(e,m,t)}function d(e){return!0}function m(e){return!!e}n(80559);const f={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},13069:(e,t,n)=>{n.d(t,{lk:()=>i,vD:()=>s,yS:()=>o});const r="randomUUID"in crypto;function i(){if(r)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}},80754:(e,t,n)=>{n.d(t,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>c});var r=n(82799),i=n(16930),o=n(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=c(e);for(const e of n)for(const n of e)n[0]+=t;return e}function c(e){return(0,o.Bi)(e)?e.rings:e.paths}},4146:(e,t,n)=>{n.d(t,{A:()=>v});var r=n(90237),i=(n(59456),n(78888)),o=n(60945),s=n(49186),a=n(65529),l=n(4902),c=n(92474),u=n(53966),h=n(74887),p=n(84952),d=n(10107),m=(n(44208),n(87811),n(40608)),f=n(92602),y=n(5443),g=n(16930);let _=0,x=class extends(a.A.EventedMixin((0,l.sA)(c.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.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 n.e(7982).then(n.bind(n,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await n.e(5613).then(n.bind(n,45613));try{return await r(t)}catch(e){const n=t?.portalItem,r=n?.id||"unset",i=n?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,h.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 hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,p.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,d.MZ)({type:String})],x.prototype,"attributionDataUrl",void 0),(0,r._)([(0,d.MZ)({type:y.A})],x.prototype,"fullExtent",void 0),(0,r._)([(0,d.MZ)({readOnly:!0})],x.prototype,"hasAttributionData",null),(0,r._)([(0,d.MZ)({type:String,clonable:!1})],x.prototype,"id",void 0),(0,r._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],x.prototype,"legendEnabled",void 0),(0,r._)([(0,d.MZ)({type:["show","hide","hide-children"]})],x.prototype,"listMode",void 0),(0,r._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],x.prototype,"opacity",void 0),(0,r._)([(0,d.MZ)({clonable:!1})],x.prototype,"parent",void 0),(0,r._)([(0,d.MZ)({readOnly:!0})],x.prototype,"parsedUrl",null),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],x.prototype,"persistenceEnabled",void 0),(0,r._)([(0,d.MZ)({type:Boolean})],x.prototype,"popupEnabled",void 0),(0,r._)([(0,d.MZ)({type:Boolean})],x.prototype,"attributionVisible",void 0),(0,r._)([(0,d.MZ)({type:g.A})],x.prototype,"spatialReference",void 0),(0,r._)([(0,d.MZ)({type:String})],x.prototype,"title",void 0),(0,r._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],x.prototype,"type",void 0),(0,r._)([(0,d.MZ)()],x.prototype,"url",void 0),(0,r._)([(0,d.MZ)({type:o.A})],x.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],x.prototype,"visible",void 0),x=(0,r._)([(0,m.$)("esri.layers.Layer")],x);const v=x},87899:(e,t,n)=>{n.r(t),n.d(t,{default:()=>mt});var r=n(90237),i=n(5503),o=n(49186),s=n(53966),a=n(92071),l=n(74887),c=n(10107),u=n(79901),h=(n(87811),n(44208),n(36005)),p=n(40608),d=n(43937),m=n(35666),f=n(4146),y=n(63074),g=n(16131),_=n(8303),x=n(25036),v=n(69540),M=n(25482),w=n(77690),b=n(29242),S=n(37585),A=n(38954);const I=(0,n(51850).vt)(),P=(0,b.vt)(),L=(0,b.vt)(),T=(0,b.vt)();function O(e,t,n){return(0,A.s)(I,t[0],t[1],1),(0,A.t)(I,I,(0,w.mg)(P,n)),0===I[2]?(0,S.hZ)(e,I[0],I[1]):(0,S.hZ)(e,I[0]/I[2],I[1]/I[2])}function E(e,t,n){return R(L,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),R(T,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,w.lw)(e,(0,w.KC)(L,L),T),0!==e[8]&&(e[0]/=e[8],e[1]/=e[8],e[2]/=e[8],e[3]/=e[8],e[4]/=e[8],e[5]/=e[8],e[6]/=e[8],e[7]/=e[8],e[8]/=e[8]),e}function R(e,t,n,r,i,o,s,a,l){(0,w.hZ)(e,t,r,o,n,i,s,1,1,1),(0,A.s)(I,a,l,1),(0,w.KC)(P,e);const[c,u,h]=(0,A.t)(I,I,(0,w.mg)(P,P));return(0,w.hZ)(P,c,0,0,0,u,0,0,0,h),(0,w.lw)(e,P,e)}var B=n(90629),Z=n(48163),G=n(86738),C=n(39829),j=n(57251),U=n(16930);let N=class extends v.P{projectOrWarn(e,t){if(null==e)return e;const{geometry:n,pending:r}=(0,j.projectOrLoad)(e,t);return r?null:r||n?n:(s.A.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:e,sourceSpatialReference:e.spatialReference,targetSpatialReference:t}),null)}};N=(0,r._)([(0,p.$)("esri.layers.support.GeoreferenceBase")],N);const $=N,Y=(0,b.vt)(),D=(0,Z.vt)();let X=class extends M.oY{};(0,r._)([(0,c.MZ)({type:Number,json:{write:!0}})],X.prototype,"x",void 0),(0,r._)([(0,c.MZ)({type:Number,json:{write:!0}})],X.prototype,"y",void 0),X=(0,r._)([(0,p.$)("esri.layers.support.ControlPointsGeoreference.ControlPointJSONType")],X);let H=class extends v.P{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,r._)([(0,c.MZ)()],H.prototype,"sourcePoint",void 0),(0,r._)([(0,c.MZ)({type:G.A})],H.prototype,"mapPoint",void 0),H=(0,r._)([(0,p.$)("esri.layers.support.ControlPointsGeoreference.ControlPoint")],H);let F=class extends((0,M.Te)($)){constructor(e){super(e),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(e,t){const n=U.A.fromJSON(t.spatialReference),r=(0,b.fA)(...t.coefficients,1);return e.map((e=>((0,S.hZ)(D,e.x,e.y),O(D,D,r),{sourcePoint:e,mapPoint:new G.A({x:D[0],y:D[1],spatialReference:n})})))}writeControlPoints(e,t,n,r){if(null!=this.transform)null!=e&&V(e[0])&&(t.controlPoints=e.map((e=>{const t=e.sourcePoint;return{x:t.x,y:t.y}})),t.spatialReference=e[0].mapPoint.spatialReference.toJSON(),t.coefficients=this.transform.slice(0,8));else{const e=new o.A("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration.",{layer:r?.layer,georeference:this});r?.messages?r.messages.push(e):s.A.getLogger(this).error(e.name,e.message)}}get coords(){if(null==this.controlPoints)return null;const e=this._updateTransform(Y);if(null==e||!V(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return function(e,t,n,r){const i=(0,Z.fA)(0,n),o=(0,Z.fA)(0,0),s=(0,Z.fA)(t,0),a=(0,Z.fA)(t,n);return O(i,i,e),O(o,o,e),O(s,s,e),O(a,a,e),new C.A({rings:[[i,o,s,a,i]],spatialReference:r})}(e,this.width,this.height,t)}set coords(e){if(null==this.controlPoints||!V(this.controlPoints[0]))return;const t=this.controlPoints[0].mapPoint.spatialReference;if(null==(e=this.projectOrWarn(e,t)))return;const{width:n,height:r}=this,{rings:[[i,o,s,a]]}=e,l={sourcePoint:(0,B.tc)(0,r),mapPoint:new G.A({x:i[0],y:i[1],spatialReference:t})},c={sourcePoint:(0,B.tc)(0,0),mapPoint:new G.A({x:o[0],y:o[1],spatialReference:t})},u={sourcePoint:(0,B.tc)(n,0),mapPoint:new G.A({x:s[0],y:s[1],spatialReference:t})},h={sourcePoint:(0,B.tc)(n,r),mapPoint:new G.A({x:a[0],y:a[1],spatialReference:t})};V(l)&&V(c)&&V(u)&&V(h)&&(re(Y,l,c,u,h),this.controlPoints=this.controlPoints.map((({sourcePoint:e})=>((0,S.hZ)(D,e.x,e.y),O(D,D,Y),{sourcePoint:e,mapPoint:new G.A({x:D[0],y:D[1],spatialReference:t})}))))}get inverseTransform(){return null==this.transform?null:(0,w.B8)((0,b.vt)(),this.transform)}get transform(){return this._updateTransform()}toMap(e){if(null==e||null==this.transform||null==this.controlPoints||!V(this.controlPoints[0]))return null;(0,S.hZ)(D,e.x,e.y);const t=this.controlPoints[0].mapPoint.spatialReference;return O(D,D,this.transform),new G.A({x:D[0],y:D[1],spatialReference:t})}toSource(e){if(null==e||null==this.inverseTransform||null==this.controlPoints||!V(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return e=e.normalize(),null==(e=(0,j.projectOrLoad)(e,t).geometry)?null:((0,S.hZ)(D,e.x,e.y),O(D,D,this.inverseTransform),(0,B.tc)(D[0],D[1]))}toSourceNormalized(e){const t=this.toSource(e);return null!=t&&(t.x/=this.width,t.y/=this.height),t}_updateTransform(e){const{controlPoints:t,width:n,height:r}=this;if(!(null!=t&&n>0&&r>0))return null;const[i,o,s,a]=t;if(!V(i))return null;const l=i.mapPoint.spatialReference,c=this._projectControlPoint(o,l),u=this._projectControlPoint(s,l),h=this._projectControlPoint(a,l);if(!c.valid||!u.valid||!h.valid)return null;if(!V(c.controlPoint))return null;null==e&&(e=(0,b.vt)());let p=null;return p=V(u.controlPoint)&&V(h.controlPoint)?re(e,i,c.controlPoint,u.controlPoint,h.controlPoint):V(u.controlPoint)?function(e,t,n,r){return ne(W,K,t),ne(z,J,n),ne(k,Q,r),(0,S.Cc)(q,W,z,.5),(0,S.e$)(q,k,q,Math.PI),(0,S.Cc)(ee,K,J,.5),(0,S.e$)(ee,Q,ee,Math.PI),ae(e,W,z,k,q,K,J,Q,ee)}(e,i,c.controlPoint,u.controlPoint):function(e,t,n){return ne(W,K,t),ne(z,J,n),(0,S.e$)(k,z,W,te),(0,S.e$)(q,W,z,te),(0,S.e$)(Q,J,K,-te),(0,S.e$)(ee,K,J,-te),ae(e,W,z,k,q,K,J,Q,ee)}(e,i,c.controlPoint),p.every((e=>0===e))?null:p}_projectControlPoint(e,t){if(!V(e))return{valid:!0,controlPoint:e};const{sourcePoint:n,mapPoint:r}=e,{geometry:i,pending:o}=(0,j.projectOrLoad)(r,t);return o?{valid:!1,controlPoint:null}:o||i?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:i}}:(s.A.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:e,sourceSpatialReference:r.spatialReference,targetSpatialReference:t}),{valid:!1,controlPoint:null})}};function V(e){return null!=e?.sourcePoint&&null!=e.mapPoint}(0,r._)([(0,c.MZ)({type:[H],json:{write:{allowNull:!1,isRequired:!0,target:{controlPoints:{type:[X]},coefficients:{type:[Number]},spatialReference:{type:U.A}}}}})],F.prototype,"controlPoints",void 0),(0,r._)([(0,h.w)("controlPoints")],F.prototype,"readControlPoints",null),(0,r._)([(0,d.K)("controlPoints")],F.prototype,"writeControlPoints",null),(0,r._)([(0,c.MZ)({clonable:!1})],F.prototype,"coords",null),(0,r._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],F.prototype,"height",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],F.prototype,"inverseTransform",null),(0,r._)([(0,c.MZ)({readOnly:!0})],F.prototype,"transform",null),(0,r._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],F.prototype,"width",void 0),F=(0,r._)([(0,p.$)("esri.layers.support.ControlPointsGeoreference")],F);const W=(0,Z.vt)(),z=(0,Z.vt)(),k=(0,Z.vt)(),q=(0,Z.vt)(),K=(0,Z.vt)(),J=(0,Z.vt)(),Q=(0,Z.vt)(),ee=(0,Z.vt)(),te=Math.PI/2;function ne(e,t,n){(0,S.hZ)(e,n.sourcePoint.x,n.sourcePoint.y),(0,S.hZ)(t,n.mapPoint.x,n.mapPoint.y)}function re(e,t,n,r,i){return ne(W,K,t),ne(z,J,n),ne(k,Q,r),ne(q,ee,i),ae(e,W,z,k,q,K,J,Q,ee)}const ie=new Array(8).fill(0),oe=new Array(8).fill(0);function se(e,t,n,r,i){return e[0]=t[0],e[1]=t[1],e[2]=n[0],e[3]=n[1],e[4]=r[0],e[5]=r[1],e[6]=i[0],e[7]=i[1],e}function ae(e,t,n,r,i,o,s,a,l){return E(e,se(ie,t,n,r,i),se(oe,o,s,a,l))}const le=F;var ce=n(78888),ue=n(43668),he=n(84952),pe=n(13069),de=n(4902),me=n(92474);const fe=(0,Z.vt)();let ye=class extends ${constructor(e){super(e),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:e,topRight:t,bottomLeft:n,bottomRight:r}=this;if(null==e||null==t||null==n||null==r)return null;const i=e.spatialReference;return t=this.projectOrWarn(t,i),n=this.projectOrWarn(n,i),r=this.projectOrWarn(r,i),null==t||null==n||null==r?null:new C.A({rings:[[[n.x,n.y],[e.x,e.y],[t.x,t.y],[r.x,r.y],[n.x,n.y]]],spatialReference:i})}set coords(e){const{topLeft:t}=this;if(null==t)return;const n=t.spatialReference;if(null==(e=this.projectOrWarn(e,n)))return;const{rings:[[r,i,o,s]]}=e;this.bottomLeft=new G.A({x:r[0],y:r[1],spatialReference:n}),this.topLeft=new G.A({x:i[0],y:i[1],spatialReference:n}),this.topRight=new G.A({x:o[0],y:o[1],spatialReference:n}),this.bottomRight=new G.A({x:s[0],y:s[1],spatialReference:n})}toSourceNormalized(e){const{topLeft:t,topRight:n,bottomRight:r,bottomLeft:i}=this;if(null==e||null==t||null==n||null==r||null==i)return null;const o=t.spatialReference;e=e.normalize();const s=(0,j.projectOrLoad)(e,o).geometry;if(null==s)return null;(0,S.hZ)(fe,s.x,s.y);const a=E((0,b.vt)(),[t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y],[0,0,0,1,1,0,1,1]);return O(fe,fe,a),(0,B.tc)(fe[0],fe[1])}};(0,r._)([(0,c.MZ)({clonable:!1})],ye.prototype,"coords",null),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"bottomLeft",void 0),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"bottomRight",void 0),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"topLeft",void 0),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"topRight",void 0),ye=(0,r._)([(0,p.$)("esri.layers.support.CornersGeoreference")],ye);const ge=ye;var _e=n(34727),xe=n(34304),ve=n(5443);let Me=class extends ${constructor(e){super(e),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:e,ymin:t,xmax:n,ymax:r,spatialReference:i}=this.extent;let o;if(this.rotation){const{x:i,y:s}=this.extent.center,a=we(i,s,this.rotation);o=[a(e,t),a(e,r),a(n,r),a(n,t)],o.push(o[0])}else o=[[e,t],[e,r],[n,r],[n,t],[e,t]];return new C.A({rings:[o],spatialReference:i})}set coords(e){if(null==e||null==this.extent)return;const t=this.extent.spatialReference;if(e=this.projectOrWarn(e,t),null==e?.extent)return;const{rings:[[n,r,i]],extent:{center:{x:o,y:s}}}=e,a=(0,_e.KJ)(Math.PI/2-Math.atan2(r[1]-n[1],r[0]-n[0])),l=we(o,s,-a),[c,u]=l(n[0],n[1]),[h,p]=l(i[0],i[1]);this.extent=new ve.A({xmin:c,ymin:u,xmax:h,ymax:p,spatialReference:t}),this.rotation=a}toSourceNormalized(e){const{extent:t,rotation:n}=this;if(null==e||null==t)return null;const{xmin:r,ymin:i,xmax:o,ymax:s,center:a,spatialReference:l}=t;e=e.normalize();const c=(0,j.projectOrLoad)(e,l).geometry;if(null==c)return null;let u=c.x,h=c.y;return n&&([u,h]=we(a.x,a.y,-n)(u,h)),(0,B.tc)((0,_e.hs)(u,r,o,0,1),(0,_e.hs)(h,s,i,0,1))}};function we(e,t,n){const r=(0,xe.DF)(n),i=Math.cos(r),o=Math.sin(r);return(n,r)=>[i*(n-e)+o*(r-t)+e,i*(r-t)-o*(n-e)+t]}(0,r._)([(0,c.MZ)({clonable:!1})],Me.prototype,"coords",null),(0,r._)([(0,c.MZ)({type:ve.A})],Me.prototype,"extent",void 0),(0,r._)([(0,c.MZ)({type:Number})],Me.prototype,"rotation",void 0),Me=(0,r._)([(0,p.$)("esri.layers.support.ExtentAndRotationGeoreference")],Me);const be=Me;n(59456);var Se=n(21325);function Ae(e,t){const n=(0,m.aB)(t);return function(e){return"media"===e?.type}(e)&&!!e.portalItem&&null!=n&&n>m.Gr.PORTAL_ITEM}const Ie={key:"type",base:$,typeMap:{"control-points":le,corners:ge,"extent-and-rotation":be}},Pe={key:"type",base:$,typeMap:{"control-points":le}};let Le=class extends((0,de.PH)((0,a.P)(me.A))){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return le.fromJSON(e)}writeGeoreference(e,t,n,r){const i=r?.resources?.pendingOperations,o=()=>{const i=function(e,t,n){if(!e||"control-points"===e.type)return e;const{coords:r}=e;if(5!==r?.rings[0]?.length)return null;const[i,o,s,a]=r.rings[0],{spatialReference:l}=r;return new le({controlPoints:[{mapPoint:new G.A({x:i[0],y:i[1],spatialReference:l}),sourcePoint:(0,B.tc)(0,n)},{mapPoint:new G.A({x:o[0],y:o[1],spatialReference:l}),sourcePoint:(0,B.tc)(0,0)},{mapPoint:new G.A({x:s[0],y:s[1],spatialReference:l}),sourcePoint:(0,B.tc)(t,0)},{mapPoint:new G.A({x:a[0],y:a[1],spatialReference:l}),sourcePoint:(0,B.tc)(t,n)}],width:t,height:n})}(this.georeference,this.contentWidth,this.contentHeight);i&&("control-points"!==e.type&&s.A.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),t[n]=i.write({},r))};if("control-points"!==e.type&&!this.loaded&&i)return t[n]={},void i.push(this.load().then(o));o()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){const{georeference:t,contentWidth:n,contentHeight:r}=this;if(null==e||null==t||0===n||0===r)return null;const i=t.toSourceNormalized(e);return null==i?null:(i.x*=n,i.y*=r,i)}};(0,r._)([(0,c.MZ)({types:Ie,json:{write:!0,types:Pe}})],Le.prototype,"georeference",void 0),(0,r._)([(0,h.w)("georeference")],Le.prototype,"readGeoreference",null),(0,r._)([(0,d.K)("georeference")],Le.prototype,"writeGeoreference",null),(0,r._)([(0,c.MZ)({json:{read:!1,write:!1}})],Le.prototype,"opacity",void 0),Le=(0,r._)([(0,p.$)("esri.layers.support.MediaElementBase")],Le);const Te=Le;var Oe=n(85648),Ee=n(97159);let Re=class extends Te{constructor(e){super(e),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this.image=null}load(){const e=this.image;if("string"==typeof e){const t=(0,ue.M5)(e).then((e=>{this._set("content",e)}));this.addResolvingPromise(t)}else if(e instanceof HTMLImageElement){const t=e.decode().then((()=>{this._set("content",e)}));this.addResolvingPromise(t)}else e?this._set("content",e):this.addResolvingPromise(Promise.reject(new o.A("image-element:invalid-image-type","Invalid image type",{image:e})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(e,t,n){return(0,Ee.f)(t.url,n)}writeImage(e,t,n,r){if(null==e)return;const i=r?.portalItem,o=r?.resources;if(!i||!o)return void("string"==typeof e&&(t[n]=(0,Ee.t)(e,r)));const s=function(e){return"string"==typeof e&&!(0,he.DB)(e)&&!(0,he.w8)(e)}(e)?e:null;if(s){if(null==(0,Ee.i)(s))return void(t[n]=s);const e=(0,Ee.t)(s,{...r,verifyItemRelativeUrls:r?.verifyItemRelativeUrls?{writtenUrls:r.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},Ee.M.NO);if(i&&e&&!(0,he.oP)(e))return o.toKeep.push({resource:i.resourceFromPath(e),compress:!1}),void(t[n]=e)}t[n]="<pending>",o.pendingOperations.push(async function(e){return"string"==typeof e?(0,he.DB)(e)?(0,he.N9)(e):(await(0,ce.A)(e,{responseType:"blob"})).data:new Promise((t=>function(e){if(e instanceof HTMLCanvasElement)return e;const t=e instanceof HTMLImageElement?e.naturalWidth:e.width,n=e instanceof HTMLImageElement?e.naturalHeight:e.height,r=document.createElement("canvas"),i=r.getContext("2d");return r.width=t,r.height=n,e instanceof HTMLImageElement?i.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&i.putImageData(e,0,0),r}(e).toBlob(t)))}(e).then((e=>{const r=function(e,t){const n=(0,pe.lk)(),r=`${(0,he.fj)("media",n)}.${(0,Oe.n)({type:"blob",blob:e})}`;return t.resourceFromPath(r)}(e,i);t[n]=r.itemRelativeUrl,o.toAdd.push({resource:r,content:{type:"blob",blob:e},compress:!1,finish:e=>{this.image=e.url}})})))}write(e,t){const n=super.write(e,t);return"mediaType"in n&&!n.url&&delete n.mediaType,n}};(0,r._)([(0,c.MZ)()],Re.prototype,"animationOptions",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],Re.prototype,"content",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],Re.prototype,"contentWidth",null),(0,r._)([(0,c.MZ)({readOnly:!0})],Re.prototype,"contentHeight",null),(0,r._)([(0,c.MZ)({json:{name:"url",type:String,write:{overridePolicy:(e,t,n)=>({enabled:!Ae(n?.layer,n?.origin)})}}})],Re.prototype,"image",void 0),(0,r._)([(0,h.w)("image",["url"])],Re.prototype,"readImage",null),(0,r._)([(0,d.K)("image")],Re.prototype,"writeImage",null),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:{target:"mediaType",ignoreOrigin:!0}}})],Re.prototype,"type",void 0),Re=(0,r._)([(0,p.$)("esri.layers.support.ImageElement")],Re);const Be=Re;var Ze=n(62885),Ge=n(65529),Ce=n(61893),je=n(36708),Ue=n(19419),Ne=n(12176),$e=n(6518),Ye=n(69622),De=n(537),Xe=n(95108),He=n(65864),Fe=n(80754);function Ve(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,Fe.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,Fe.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,Fe.kd)(r,t);e.x+=n*(-2*t)}else if(r<n){const t=(0,Fe.kd)(r,n);e.x+=t*(-2*n)}}return e}function We(e,t){const n=[],{ymin:r,ymax:i,xmin:o,xmax:s}=e,a=e.xmax-e.xmin,[l,c]=t.valid,{x:u,frameId:h}=ze(e.xmin,t),{x:p,frameId:d}=ze(e.xmax,t),m=u===p&&a>0;if(a>2*c){const e={xmin:o<s?u:p,ymin:r,xmax:c,ymax:i},t={xmin:l,ymin:r,xmax:o<s?p:u,ymax:i},a={xmin:0,ymin:r,xmax:c,ymax:i},m={xmin:l,ymin:r,xmax:0,ymax:i},f=[],y=[];ke(e,a)&&f.push(h),ke(e,m)&&y.push(h),ke(t,a)&&f.push(d),ke(t,m)&&y.push(d);for(let e=h+1;e<d;e++)f.push(e),y.push(e);n.push(new Je(e,[h]),new Je(t,[d]),new Je(a,f),new Je(m,y))}else u>p||m?n.push(new Je({xmin:u,ymin:r,xmax:c,ymax:i},[h]),new Je({xmin:l,ymin:r,xmax:p,ymax:i},[d])):n.push(new Je({xmin:u,ymin:r,xmax:p,ymax:i},[h]));return n}function ze(e,t){const[n,r]=t.valid,i=2*r;let o,s=0;return e>r?(o=Math.ceil(Math.abs(e-r)/i),e-=o*i,s=o):e<n&&(o=Math.ceil(Math.abs(e-n)/i),e+=o*i,s=-o),{x:e,frameId:s}}function ke(e,t){const{xmin:n,ymin:r,xmax:i,ymax:o}=t;return qe(e,n,r)&&qe(e,n,o)&&qe(e,i,o)&&qe(e,i,r)}function qe(e,t,n){return t>=e.xmin&&t<=e.xmax&&n>=e.ymin&&n<=e.ymax}function Ke(e,t,n=!0){const r=!(0,He.Rg)(e);if(r&&(0,Xe.m3)(e),n)return(new et).cut(e,t);const i=r?e.rings:e.paths,o=r?4:2,s=i.length,a=-2*t;for(let e=0;e<s;e++){const t=i[e];if(t&&t.length>=o){const e=[];for(const n of t)e.push([n[0]+a,n[1]]);i.push(e)}}return r?e.rings=i:e.paths=i,e}class Je{constructor(e,t){this.extent=e,this.frameIds=t}}const Qe=(0,Ue.vt)();class et{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let n;if(this._xCut=t,e.rings)this._closed=!0,n=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,n=e.paths,this._minPts=2}for(const e of n){if(!e||e.length<this._minPts)continue;let t=!0;for(const n of e)t?(this.moveTo(n),t=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const e of this._linesIn)e&&e.length>=this._minPts&&n.push(e);const r=-2*this._xCut;for(const e of this._linesOut)if(e&&e.length>=this._minPts){for(const t of e)t[0]+=r;n.push(e)}return this._closed?e.rings=n:e.paths=n,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e[0],e[1],this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){const t=this._side(e[0]);if(t*this._prevSide==-1){const n=this._intersect(this._prevPt,e);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(e[0],e[1],t)}else this._lineTo(e[0],e[1],t);this._prevSide=t,this._prevPt=e}close(){const e=this._firstPt,t=this._prevPt;e[0]===t[0]&&e[1]===t[1]||this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t,n){this._closed?(this._lineIn.push([n<=0?e:this._xCut,t]),this._lineOut.push([n>=0?e:this._xCut,t])):(n<=0&&this._lineIn.push([e,t]),n>=0&&this._lineOut.push([e,t]))}_lineTo(e,t,n){this._closed?(tt(this._lineIn,n<=0?e:this._xCut,t),tt(this._lineOut,n>=0?e:this._xCut,t)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([e,t])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([e,t])):this._prevSide<0?(this._lineIn.push([e,t]),this._lineOut.push([e,t])):this._prevSide>0&&(this._lineOut.push([e,t]),this._lineIn.push([e,t]))}_checkClosingPt(e){const t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0][1]=e[t-2][1],e.pop())}_side(e){return e<this._xCut?-1:e>this._xCut?1:0}_intersect(e,t){const n=(this._xCut-e[0])/(t[0]-e[0]);return e[1]+n*(t[1]-e[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function tt(e,t,n){const r=e.length;r>1&&e[r-1][0]===t&&e[r-2][0]===t?e[r-1][1]=n:e.push([t,n])}let nt=class extends Ye.A{constructor(e){super(e)}get bounds(){const e=this.coords;return null==e?.extent?null:(0,Ue.VY)(e.extent)}get coords(){const e=this.element.georeference?.coords;return(0,j.projectOrLoad)(e,this.spatialReference).geometry}get normalizedCoords(){return C.A.fromJSON(function(e,t){if(null==e)return null;const n=e.spatialReference,r=(0,Se.Vp)(n),i=(0,M.Wj)(e)?e.toJSON():e;if(!r)return i;const o=(0,Se.K8)(n)?102100:4326,s=Fe.j7[o].maxX,a=Fe.j7[o].minX;if((0,He.fT)(i))return Ve(i,s,a);if((0,He.U9)(i))return i.points=i.points.map((e=>Ve(e,s,a))),i;if((0,He.ZC)(i))return function(e,t){if(!t)return e;const n=We(e,t).map((e=>e.extent));return n.length<2?n[0]||e:n.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:n.map((e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]))}}(i,r);if((0,He.Bi)(i)||(0,He.Rg)(i)){const e=(0,De.Rg)(Qe,i),n={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},r=(0,Fe.kd)(n.xmin,a)*(2*s),o=0===r?i:(0,Fe.kS)(i,r);return n.xmin+=r,n.xmax+=r,n.xmax>s?Ke(o,s,t):n.xmin<a?Ke(o,a,t):o}return i}(this.coords,!0))}get normalizedBounds(){const e=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=e?(0,Ue.VY)(e):null}};(0,r._)([(0,c.MZ)()],nt.prototype,"spatialReference",void 0),(0,r._)([(0,c.MZ)()],nt.prototype,"element",void 0),(0,r._)([(0,c.MZ)()],nt.prototype,"bounds",null),(0,r._)([(0,c.MZ)()],nt.prototype,"coords",null),(0,r._)([(0,c.MZ)()],nt.prototype,"normalizedCoords",null),(0,r._)([(0,c.MZ)()],nt.prototype,"normalizedBounds",null),nt=(0,r._)([(0,p.$)("esri.layers.support.MediaElementView")],nt);var rt=n(37955);let it=class extends Te{constructor(e){super(e),this.autoplay=!0,this.content=null,this.type="video"}load(){const e=this.video;if("string"==typeof e){const t=document.createElement("video");t.src=e,t.crossOrigin="anonymous",t.autoplay=!0,t.muted=!0,t.loop=!0,t.playsInline=!0,this.addResolvingPromise(this._loadVideo(t).then((()=>{this._set("content",t)})))}else e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then((()=>{this._set("content",e)}))):this.addResolvingPromise(Promise.reject(new o.A("video-element:invalid-video-type","Invalid video type",{video:e})));return Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}set video(e){"not-loaded"===this.loadStatus?this._set("video",e):s.A.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}_loadVideo(e){return new Promise(((t,n)=>{const r=(0,rt.Oo)(e,"canplay",(()=>{this.removeHandles("canplay"),this.autoplay?e.play().then(t,n):t()}));this.addHandles(r,"canplay"),"anonymous"!==e.crossOrigin&&(e.crossOrigin="anonymous",e.src?.includes("blob:")||(e.src=e.src))}))}};(0,r._)([(0,c.MZ)()],it.prototype,"autoplay",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],it.prototype,"content",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],it.prototype,"contentWidth",null),(0,r._)([(0,c.MZ)({readOnly:!0})],it.prototype,"contentHeight",null),(0,r._)([(0,c.MZ)()],it.prototype,"video",null),it=(0,r._)([(0,p.$)("esri.layers.support.VideoElement")],it);const ot=it,st={key:"type",defaultKeyValue:"image",base:Te,typeMap:{image:Be,video:ot}},at=i.A.ofType(st);let lt=class extends(me.A.LoadableMixin((0,Ce.g)(Ge.A.EventedAccessor))){constructor(e){super(e),this._index=new $e.F,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=e=>{for(const t of e.removed){const e=this._elementViewsMap.get(t);this._elementViewsMap.delete(t),this._index.delete(e),this.removeHandles(e),e.destroy(),this.notifyChange("fullExtent")}const{spatialReference:t}=this;for(const n of e.added){if(this._elementViewsMap.get(n))continue;const e=new nt({spatialReference:t,element:n});this._elementViewsMap.set(n,e);const r=(0,je.wB)((()=>e.coords),(()=>this._updateIndexForElement(e,!1)));this._updateIndexForElement(e,!0),this.addHandles(r,e)}this._elementsIndexes.clear(),this.elements.forEach(((e,t)=>this._elementsIndexes.set(e,t))),this.emit("refresh")},this.elements=new at}async load(e){if((0,l.Te)(e),!this.spatialReference){const e=this.elements.find((e=>null!=e.georeference?.coords));this._set("spatialReference",e?e.georeference.coords.spatialReference:U.A.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(e){this._set("elements",(0,Ze.V)(e,this._get("elements"),at))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const e=this._index.fullBounds;return null==e?null:new ve.A({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:this.spatialReference})}set spatialReference(e){"not-loaded"===this.loadStatus?this._set("spatialReference",e):s.A.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(e,t){await this.load(),await(0,j.initializeProjection)(e.spatialReference,this.spatialReference,null,t);const n=(0,Se.aI)(e.spatialReference,this.spatialReference)?e:(0,j.project)(e,this.spatialReference);if(!n)return[];const r=n.normalize(),i=[];for(const e of r)this._index.forEachInBounds((0,Ue.VY)(e),(({normalizedCoords:t,element:n})=>{null!=t&&(0,Ne.fA)(e,t)&&i.push(n)}));return i.sort(((e,t)=>this._elementsIndexes.get(e)-this._elementsIndexes.get(t))),i}hasElement(e){return this.elements.includes(e)}_updateIndexForElement(e,t){const n=e.normalizedBounds,r=this._index.has(e),i=null!=n;this._index.delete(e),i&&this._index.set(e,n),this.notifyChange("fullExtent"),t||(r!==i?this.emit("refresh"):this.emit("change",{element:e.element}))}};(0,r._)([(0,c.MZ)()],lt.prototype,"elements",null),(0,r._)([(0,c.MZ)({readOnly:!0})],lt.prototype,"fullExtent",null),(0,r._)([(0,c.MZ)()],lt.prototype,"spatialReference",null),lt=(0,r._)([(0,p.$)("esri.layers.support.LocalMediaElementSource")],lt);const ct=lt;var ut=n(92935);function ht(e){return"object"==typeof e&&null!=e&&"type"in e}function pt(e){return ht(e)&&"image"===e.type}let dt=class extends((0,y.dM)((0,x.j)((0,g.q)((0,_.A)((0,a.P)(f.A)))))){constructor(e){super(e),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=(0,l.sg)((async(e,t,r)=>{const{save:i,saveAs:o}=await n.e(3561).then(n.bind(n,63561));switch(e){case ut.X.SAVE:return i(this,t);case ut.X.SAVE_AS:return o(this,r,t)}})),this.source=new ct}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.loadFromPortal({supportedTypes:["Media Layer"]},e);let t=this.source;if(!t)throw new o.A("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");const n=this._getSourceOverride(t,this.georeference);n&&(this.setAtOrigin("source",n,"web-map"),this.setAtOrigin("source",n,"web-scene"),t=n);const r=ht(t)?new ct({elements:new i.A([t])}):t;this._set("effectiveSource",r),this.spatialReference&&(r.spatialReference=this.spatialReference),await r.load(e),this.spatialReference=r.spatialReference}destroy(){this.effectiveSource?.destroy(),this.effectiveSource!==this.source&&this.source?.destroy()}readGeoreference(e,t){return e&&"itemId"in t&&t.itemId?e:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}set source(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("source",e):s.A.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(e){return e?Array.isArray(e)?new ct({elements:new i.A(e)}):e instanceof i.A?new ct({elements:e}):e:null}readSource(e,t,n){if("itemId"in t&&t.itemId)return;const r=this._createSource(t);return r?.read(t,n),r}writeSource(e,t,n,r){if(e&&e instanceof ct){const t=e.elements.length;if(1!==t)return void(r?.messages&&r.messages.push(new o.A("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${t}.`)));e=e.elements.at(0)}pt(e)?e.write(t,r):r?.messages&&(e?r.messages.push(new o.A("media-layer:unsupported-source","only media elements of type 'ImageElement' can be persisted")):r.messages.push(new o.A("media-layer:unsupported-source","the media layer is missing a source")))}async save(e){return this._debouncedSaveOperations(ut.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(ut.X.SAVE_AS,t,e)}_createSource(e){if("mediaType"in e)switch(e.mediaType){case"image":return new Be;case"video":return new ot}return null}_getSourceOverride(e,t){if(ht(e)&&this.originIdOf("source")===m.Gr.PORTAL_ITEM&&t&&(this.originIdOf("georeference")===m.Gr.WEB_MAP||this.originIdOf("georeference")===m.Gr.WEB_SCENE)){const n=e.toJSON(),r=this._createSource(n);return r.read({...n},{origin:"portal-item"}),r.read({georeference:t},{origin:"web-map"}),r.read({georeference:t},{origin:"web-scene"}),r}return null}};(0,r._)([(0,c.MZ)({readOnly:!0})],dt.prototype,"effectiveSource",void 0),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],dt.prototype,"georeference",void 0),(0,r._)([(0,h.w)("web-document","georeference")],dt.prototype,"readGeoreference",null),(0,r._)([(0,c.MZ)({type:String})],dt.prototype,"copyright",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],dt.prototype,"fullExtent",null),(0,r._)([(0,c.MZ)({type:["MediaLayer"]})],dt.prototype,"operationalLayerType",void 0),(0,r._)([(0,c.MZ)({type:["show","hide"]})],dt.prototype,"listMode",void 0),(0,r._)([(0,c.MZ)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image"]},georeference:{type:le}},overridePolicy(e,t,n){return{enabled:!0,allowNull:!1,ignoreOrigin:Ae(this,n?.origin)&&pt(e)&&!!e.georeference&&e.originIdOf("georeference")>m.Gr.PORTAL_ITEM}}}}})],dt.prototype,"source",null),(0,r._)([(0,u.w)("source")],dt.prototype,"castSource",null),(0,r._)([(0,h.w)("source",["url"])],dt.prototype,"readSource",null),(0,r._)([(0,d.K)("source")],dt.prototype,"writeSource",null),(0,r._)([(0,c.MZ)()],dt.prototype,"spatialReference",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],dt.prototype,"type",void 0),dt=(0,r._)([(0,p.$)("esri.layers.MediaLayer")],dt);const mt=dt},6518:(e,t,n)=>{n.d(t,{F:()=>a});var r=n(44208),i=n(75503),o=n(19419);const s={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.w(9,(0,r.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((n,r)=>{e[t++]=r})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,o.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,n)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},16131:(e,t,n)=>{n.d(t,{q:()=>v});var r=n(90237),i=n(60945),o=n(49186),s=n(84952),a=n(10107),l=n(56507),c=(n(87811),n(44208),n(36005)),u=n(40608),h=n(43937),p=n(89317),d=n(45917),m=n(49422);const f={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},y={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},g={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},_={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":f,"web-map/basemap":y,"web-map/tables":g,"link-chart/operational-layers":{...f,LinkChartLayer:!0},"link-chart/basemap":y,"link-chart/tables":g,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var x=n(10873);const v=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,n){return"Group Layer"===n?.portalItem?.type?void 0:e}writeListMode(e,t,n,r){(r&&"ground"===r.layerContainerType||e&&(0,m.R)(this,n,{},r))&&(t[n]=e)}writeOperationalLayerType(e,t,n,r){e&&"tables"!==r?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?i.A.fromArray(e):null}writeTimeExtent(e,t,n,r){e&&"tables"!==r.layerContainerType&&(e.isEmpty?r?.messages&&r.messages.push(new o.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[n]=e.toArray())}read(e,t){t&&(t.layer=this),(0,d.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,n=_[e];let r=!!n?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(r=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(r=!1),!r)return t.messages?.push(new o.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const n=super.write(e,{...t,layer:this}),r=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof o.A&&"web-document-write:property-required"===e.name)).length;return(0,s.w8)(n?.url)?(t?.messages?.push(new o.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&r?null:n}beforeSave(){}};return(0,r._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,r._)([(0,c.w)("id",["id"])],t.prototype,"readId",null),(0,r._)([(0,a.MZ)(x.C1)],t.prototype,"listMode",void 0),(0,r._)([(0,h.K)("listMode")],t.prototype,"writeListMode",null),(0,r._)([(0,a.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:p.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,r._)([(0,h.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,r._)([(0,a.MZ)(x.ke)],t.prototype,"opacity",void 0),(0,r._)([(0,a.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,r._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,r._)([(0,h.K)("title"),(0,h.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,r._)([(0,a.MZ)({type:i.A,json:{origins:{"web-scene":{write:{layerContainerTypes:p.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,c.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,r._)([(0,h.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[l.jz,l.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,r._)([(0,a.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:p.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,r._)([(0,u.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,n)=>{n.d(t,{A:()=>w});var r=n(90237),i=n(92602),o=n(70333),s=n(78888),a=n(60999),l=n(49186),c=n(53966),u=n(97768),h=n(74887),p=n(84952),d=n(10107),m=(n(44208),n(87811),n(36005)),f=n(40608),y=n(43937),g=n(83531),_=n(20655),x=n(80812),v=n(41318),M=n(10407);const w=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,u.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,n){if(t.itemId)return new x.default({id:t.itemId,portal:n?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([n.e(5356),n.e(1204)]).then(n.bind(n,41204));return(0,h.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,h.zf)(e)||c.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(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:n,fullEdit:r},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let n=this.portalItem;if(!e||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===n.id;if(r&&n.portal.user)return(0,M.It)(n);let i,s;if(r)i=n.portal.url;else try{i=await(0,g.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!i||!(0,p.b8)(i,n.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const a=!0,l=!1,c=!1;if(!s)return{features:{edit:a,fullEdit:l},content:{updateItem:c}};try{if(r?await n.reload():(n=new x.default({id:e,portal:{url:i}}),await n.load(t)),n.portal.user)return(0,M.It)(n)}catch(e){(0,h.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:c}}}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?o.id?.findCredential(this.url):null;if(!t)return!0;const n=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const n=o.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;const r=`${n.owningSystemUrl}/sharing/rest`,i=_.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(r))return i.user;const l=`${r}/community/self`,c=null!=e?e.signal:null,u=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:c}));return u.ok?v.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const n=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return n&&r&&!(0,p.ut)(r.restUrl,n.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,d.MZ)({type:x.default})],t.prototype,"portalItem",null),(0,r._)([(0,m.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,y.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,d.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},b={credential:null,user:null}},85648:(e,t,n)=>{n.d(t,{n:()=>i});var r=n(84952);function i(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,r.Zo)(e);return l[t]||s}(e.url)}(e)]||a}const o={},s="text/plain",a=o[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)o[l[e]]=e},92935:(e,t,n)=>{var r;n.d(t,{X:()=>r}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(r||(r={}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7110],{39516:(e,t,r)=>{async function n(e,t){const{WhereClause:n}=await Promise.all([r.e(835),r.e(4800)]).then(r.bind(r,50835));return n.create(e,t)}function s(e,t){return"1=1"===e?t:"1=1"===t?e:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>n,m:()=>s})},3330:(e,t,r)=>{r.d(t,{GB:()=>s,Qo:()=>i,Y4:()=>o});var n=r(96285);class s{}function o(e){return e instanceof n.bo?e===s.instance:"unknown"===e?.toString().toLowerCase()}function i(e){return o(e)?s.instance:e}s.instance=new n.oh("Etc/UTC")},70328:(e,t,r)=>{r.d(t,{BI:()=>h,Ej:()=>p,Hq:()=>u,Ie:()=>y,Jt:()=>m,Ne:()=>d,RF:()=>a,aI:()=>v,fA:()=>o,hZ:()=>f,iT:()=>l,is:()=>g,qv:()=>x,vI:()=>c,v_:()=>I,vt:()=>s,w1:()=>i});var n=r(5443);function s(e=I){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,n,o,i,a=s()){return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a[4]=o,a[5]=i,a}function i(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,n=t.length/3){let s=e[0],o=e[1],i=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)s=Math.min(s,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),i=Math.min(i,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=s,e[1]=o,e[2]=i,e[3]=a,e[4]=l,e[5]=u}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function c(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function y(e){return e?f(e,x):s(x)}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function h(e,t,r,n,s){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function v(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const x=[1/0,1/0,1/0,-1/0,-1/0,-1/0],I=[0,0,0,0,0,0];s()},95466:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(49186),s=r(25482),o=r(53966),i=r(91869),a=r(3330),l=r(30524),u=r(56400),p=r(96285);const d=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],h(e))}static fromLayerJSON(e){return new c(e.fields??[],h(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,n=y(t);if(t&&n){const s=f(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(n,e),r.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(f(e))??this._normalizedFieldsMap.get(y(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(o.A.getLogger("esri.layers.support.FieldsIndex").error(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?p.mQ.utcInstance:(0,i.tE)(d,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,s.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function f(e){return e.trim().toLowerCase()}function y(e){return(0,l.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function h(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:s}=e,o=(n?"startField"in n?n.startField:n.startTimeField:"")??"",i=(n?"endField"in n?n.endField:n.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.dateFieldsTimeReference?(0,u.ZS)(s.dateFieldsTimeReference):a??u.n$:null,p=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.timeReference?(0,u.ZS)(n.timeReference):a:null,d=new Map([[f(s?.creationDateField??""),l],[f(s?.editDateField??""),l],[f(o),p],[f(i),p]]);for(const{name:n,type:s}of e.fields)if(m.has(s))t.set(n,u.L5);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(n,null);else if(r)t.set(n,u.L5);else{const e=d.get(f(n??""))??a;t.set(n,e)}return t}},50805:(e,t,r)=>{r.d(t,{L0:()=>g,Ot:()=>f,W4:()=>l,uV:()=>d});var n=r(90237),s=r(25482),o=r(10107),i=(r(44208),r(53966),r(87811),r(93223)),a=r(40608);let l=class extends s.oY{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};(0,n._)([(0,o.MZ)({type:Number})],l.prototype,"nodesPerPage",void 0),(0,n._)([(0,o.MZ)({type:Number})],l.prototype,"rootIndex",void 0),(0,n._)([(0,o.MZ)({type:String})],l.prototype,"lodSelectionMetricType",void 0),l=(0,n._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SNodePageDefinition")],l);let u=class extends s.oY{constructor(){super(...arguments),this.factor=1}};(0,n._)([(0,o.MZ)({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],u.prototype,"id",void 0),(0,n._)([(0,o.MZ)({type:Number})],u.prototype,"factor",void 0),u=(0,n._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialTexture")],u);let p=class extends s.oY{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};(0,n._)([(0,o.MZ)({type:[Number]})],p.prototype,"baseColorFactor",void 0),(0,n._)([(0,o.MZ)({type:u})],p.prototype,"baseColorTexture",void 0),(0,n._)([(0,o.MZ)({type:u})],p.prototype,"metallicRoughnessTexture",void 0),(0,n._)([(0,o.MZ)({type:Number})],p.prototype,"metallicFactor",void 0),(0,n._)([(0,o.MZ)({type:Number})],p.prototype,"roughnessFactor",void 0),p=(0,n._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialPBRMetallicRoughness")],p);let d=class extends s.oY{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};(0,n._)([(0,i.e)({opaque:"opaque",mask:"mask",blend:"blend"})],d.prototype,"alphaMode",void 0),(0,n._)([(0,o.MZ)({type:Number})],d.prototype,"alphaCutoff",void 0),(0,n._)([(0,o.MZ)({type:Boolean})],d.prototype,"doubleSided",void 0),(0,n._)([(0,i.e)({none:"none",back:"back",front:"front"})],d.prototype,"cullFace",void 0),(0,n._)([(0,o.MZ)({type:u})],d.prototype,"normalTexture",void 0),(0,n._)([(0,o.MZ)({type:u})],d.prototype,"occlusionTexture",void 0),(0,n._)([(0,o.MZ)({type:u})],d.prototype,"emissiveTexture",void 0),(0,n._)([(0,o.MZ)({type:[Number]})],d.prototype,"emissiveFactor",void 0),(0,n._)([(0,o.MZ)({type:p})],d.prototype,"pbrMetallicRoughness",void 0),d=(0,n._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialDefinition")],d);let c=class extends s.oY{};(0,n._)([(0,o.MZ)({type:String,json:{read:{source:["name","index"],reader:(e,t)=>null!=e?e:`${t.index}`}}})],c.prototype,"name",void 0),(0,n._)([(0,i.e)({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],c.prototype,"format",void 0),c=(0,n._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3STextureFormat")],c);let f=class extends s.oY{constructor(){super(...arguments),this.atlas=!1}};(0,n._)([(0,o.MZ)({type:[c]})],f.prototype,"formats",void 0),(0,n._)([(0,o.MZ)({type:Boolean})],f.prototype,"atlas",void 0),f=(0,n._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3STextureSetDefinition")],f);let y=class extends s.oY{};(0,n._)([(0,i.e)({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],y.prototype,"type",void 0),(0,n._)([(0,o.MZ)({type:Number})],y.prototype,"component",void 0),y=(0,n._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryAttribute")],y);let m=class extends s.oY{};(0,n._)([(0,i.e)({draco:"draco"})],m.prototype,"encoding",void 0),(0,n._)([(0,o.MZ)({type:[String]})],m.prototype,"attributes",void 0),m=(0,n._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryCompressedAttributes")],m);let h=class extends s.oY{constructor(){super(...arguments),this.offset=0}};(0,n._)([(0,o.MZ)({type:Number})],h.prototype,"offset",void 0),(0,n._)([(0,o.MZ)({type:y})],h.prototype,"position",void 0),(0,n._)([(0,o.MZ)({type:y})],h.prototype,"normal",void 0),(0,n._)([(0,o.MZ)({type:y})],h.prototype,"uv0",void 0),(0,n._)([(0,o.MZ)({type:y})],h.prototype,"color",void 0),(0,n._)([(0,o.MZ)({type:y})],h.prototype,"uvRegion",void 0),(0,n._)([(0,o.MZ)({type:y})],h.prototype,"featureId",void 0),(0,n._)([(0,o.MZ)({type:y})],h.prototype,"faceRange",void 0),(0,n._)([(0,o.MZ)({type:m})],h.prototype,"compressedAttributes",void 0),h=(0,n._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryBuffer")],h);let g=class extends s.oY{};(0,n._)([(0,i.e)({triangle:"triangle"})],g.prototype,"topology",void 0),(0,n._)([(0,o.MZ)()],g.prototype,"geometryBuffers",void 0),g=(0,n._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryDefinition")],g)},92009:(e,t,r)=>{r.d(t,{L:()=>p});var n=r(70333),s=r(78888),o=r(49186),i=r(74887),a=r(60694),l=r(20655),u=r(80812);async function p(e,t){const r=(0,a.qg)(e);if(!r)throw new o.A("invalid-url","Invalid scene service url");const p={...t,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(p.sceneLayerItem??=await async function(e){const t=(await d(e)).serviceItemId;if(!t)return null;const r=new u.default({id:t,apiKey:e.apiKey}),o=await async function(e){const t=n.id?.findServerInfo(e.sceneServerUrl);if(t?.owningSystemUrl)return t.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const t=(await(0,s.A)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(t)return t}catch(e){(0,i.QP)(e)}return null}(e);null!=o&&(r.portal=new l.A({url:o}));try{return r.load({signal:e.signal})}catch(e){return(0,i.QP)(e),null}}(p),null==p.sceneLayerItem)return c(p.sceneServerUrl.replace("/SceneServer","/FeatureServer"),p);const f=await async function({sceneLayerItem:e,signal:t}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:t})).find((e=>"Feature Service"===e.type))||null;if(!r)return null;const n=new u.default({portal:r.portal,id:r.id});return await n.load(),n}catch(e){return(0,i.QP)(e),null}}(p);if(!f?.url)throw new o.A("related-service-not-found","Could not find feature service through portal item relationship");p.featureServiceItem=f;const y=await c(f.url,p);return y.portalItem=f,y}async function d(e){if(e.rootDocument)return e.rootDocument;const t={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,s.A)(e.sceneServerUrl,t);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function c(e,t){const r=(0,a.qg)(e);if(!r)throw new o.A("invalid-feature-service-url","Invalid feature service url");const n=r.url.path,i=t.layerId;if(null==i)return{serverUrl:n};const l=d(t),u=t.featureServiceItem?await t.featureServiceItem.fetchData("json"):null,p=(u?.layers?.[0]||u?.tables?.[0])?.customParameters,c=e=>{const r={query:{f:"json",...p},responseType:"json",authMode:e,signal:t.signal};return(0,s.A)(n,r)},f=c("anonymous").catch((()=>c("no-prompt"))),[y,m]=await Promise.all([f,l]),h=m?.layers,g=y.data&&y.data.layers;if(!Array.isArray(g))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,g.length);e++)if(h[e].id===i)return{serverUrl:n,layerId:g[e].id}}else if(null!=i&&i<g.length)return{serverUrl:n,layerId:g[i].id};throw new Error("could not find matching associated sublayer")}},4071:(e,t,r)=>{r.d(t,{P:()=>n});const n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},32730:(e,t,r)=>{r.d(t,{BI:()=>h,D3:()=>y,XJ:()=>m,lc:()=>f,mX:()=>v,rU:()=>g,tH:()=>S});var n=r(799);const s="__begin__",o="__end__",i=new RegExp(s,"ig"),a=new RegExp(o,"ig"),l=new RegExp("^"+s,"i"),u=new RegExp(o+"$","i"),p='"',d=p+" + ",c=" + "+p;function f(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function y(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=f(e.labelExpression),t.type="conventional"),t}function h(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return v(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(x);return t?.[1].trim()||null}(t.expression);case"arcade":return S(t.expression)}return null}function v(e){let t;return e?(t=(0,n.HC)(e,(e=>s+'$feature["'+e+'"]'+o)),t=l.test(t)?t.replace(l,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(i,d).replaceAll(a,c)):t='""',t}const x=/^\s*\{([^}]+)\}\s*$/i,I=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,F=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,_=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function S(e){if(!e)return null;let t=I.exec(e)||F.exec(e);return t?t[1]||t[3]:(t=_.exec(e),t?t[2]:null)}},24212:(e,t,r)=>{function n(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?l:u}(e).mode}(null!=e&&e.hasZ,t)}function s(e,t,r){return r&&r.mode!==t?`${e} only support ${t} elevation mode`:null}function o(e,t,r){return r?.mode===t?`${e} do not support ${t} elevation mode`:null}function i(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function a(e,t){t&&e.warn(".elevationInfo=",t)}r.d(t,{$7:()=>o,B:()=>s,XF:()=>a,tW:()=>i,w7:()=>n}),r(83047),r(16271);const l={mode:"absolute-height",offset:0},u={mode:"on-the-ground",offset:null}},45671:(e,t,r)=>{r.d(t,{D8:()=>o,TO:()=>s});var n=r(30524);async function s(e,t=e.popupTemplate){if(null==t)return[];const r=await t.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:s}=t,{objectIdField:o,typeIdField:i,globalIdField:a,relationships:l}=e;if(r.includes("*"))return["*"];const u=s?(0,n.eX)(e):[],p=(0,n.DB)(e.fieldsIndex,[...r,...u]);return i&&p.push(i),p&&o&&e.fieldsIndex?.has(o)&&!p.includes(o)&&p.push(o),p&&a&&e.fieldsIndex?.has(a)&&!p.includes(a)&&p.push(a),l&&l.forEach((t=>{const{keyField:r}=t;p&&r&&e.fieldsIndex?.has(r)&&!p.includes(r)&&p.push(r)})),p}function o(e,t){return e.popupTemplate?e.popupTemplate:null!=t&&t.defaultPopupTemplateEnabled&&null!=e.defaultPopupTemplate?e.defaultPopupTemplate:null}}}]);