@arcgis/core 4.33.0-next.20250515 → 4.33.0-next.20250516

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/Basemap.js +1 -1
  2. package/applications/Components/baUtils.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{8f1fbfdac04e694f621d.js → 0c50ee1f3cdd30d96479.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{7e8f78b96d43c224c7b6.js → 19c50f052eba0553bf4d.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{1f4fd9e3849f4e593375.js → 2b1486a466760d2152f5.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{a673128da9e6656ead2e.js → 320e821af81138fe12ac.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{d166f805990353578494.js → 523046e04679e301797d.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{a0d2bd5d4ed3c90f6b1c.js → 5f766bcb751d66fbf1c8.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{d21d9e8b8c8a2e0485d5.js → 612f6739c9399fbae4d0.js} +1 -1
  11. package/assets/esri/core/workers/chunks/7a9a0383f27f4967bcfa.js +1 -0
  12. package/assets/esri/core/workers/chunks/87fc7b6c3e2d4f7775e2.js +1 -0
  13. package/assets/esri/core/workers/chunks/{3b4b4f84d594db8945f9.js → 9839309d0cd804fe52c2.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{c10885b3a0739708e9e0.js → 9a06476b834584d00d5c.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{62798f66872dc32e77d6.js → a70a86ba4e487f62f683.js} +1 -1
  16. package/assets/esri/core/workers/chunks/a937076d2f8c2b6a5d8a.js +1 -0
  17. package/assets/esri/core/workers/chunks/{8e82acd1f730571680f4.js → aeb5bbe861f65544d504.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{5e52c1c076a1502f9fe4.js → be2c8c0a8b2bce7979b6.js} +1 -1
  19. package/assets/esri/themes/base/widgets/_Editor.scss +2 -1
  20. package/assets/esri/themes/base/widgets/_SearchResultRenderer.scss +5 -30
  21. package/assets/esri/themes/dark/main.css +1 -1
  22. package/assets/esri/themes/light/main.css +1 -1
  23. package/assets/esri/themes/light/view.css +1 -1
  24. package/assets/esri/widgets/Search/t9n/Search.json +1 -1
  25. package/assets/esri/widgets/Search/t9n/Search_en.json +1 -1
  26. package/chunks/ShadowCastClear.glsl.js +5 -0
  27. package/config.js +1 -1
  28. package/geometry/support/aaBoundingBox.js +1 -1
  29. package/interfaces.d.ts +137 -40
  30. package/package.json +2 -2
  31. package/portal/Portal.js +1 -1
  32. package/request.js +1 -1
  33. package/rest/knowledgeGraph/GraphAddNamedTypesResult.js +1 -1
  34. package/rest/knowledgeGraph/GraphAddPropertyResult.js +5 -0
  35. package/rest/knowledgeGraph/GraphApplyEditsResult.js +1 -1
  36. package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.js +1 -1
  37. package/rest/knowledgeGraph/GraphDeletePropertyResult.js +5 -0
  38. package/rest/knowledgeGraph/GraphUpdateNamedTypesResult.js +5 -0
  39. package/rest/knowledgeGraph/GraphUpdatePropertyResult.js +5 -0
  40. package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
  41. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +1 -1
  42. package/rest/knowledgeGraphService.js +1 -1
  43. package/rest/networks/unitIdentifiers/insertGap.js +5 -0
  44. package/rest/networks/unitIdentifiers/queryUnitIdentifiers.js +5 -0
  45. package/rest/networks/unitIdentifiers/reset.js +5 -0
  46. package/rest/networks/unitIdentifiers/resize.js +5 -0
  47. package/rest/networks/unitIdentifiers/support/InsertGapParameters.js +5 -0
  48. package/rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParamters.js +5 -0
  49. package/rest/networks/unitIdentifiers/support/ResetParameters.js +5 -0
  50. package/rest/networks/unitIdentifiers/support/ResizeParameters.js +5 -0
  51. package/rest/networks/unitIdentifiers/support/UnitQueryResult.js +5 -0
  52. package/rest/utils.js +1 -1
  53. package/support/apiKeyUtils.js +1 -1
  54. package/support/basemapEnsureType.js +1 -1
  55. package/support/revision.js +1 -1
  56. package/unionTypes.d.ts +2 -0
  57. package/views/3d/FocusAreasView.js +1 -1
  58. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  59. package/views/3d/layers/ContentGeometryLayerView.js +5 -0
  60. package/views/3d/layers/FlowSubView3D.js +1 -1
  61. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  62. package/views/3d/layers/I3SMeshView3D.js +1 -1
  63. package/views/3d/layers/RouteLayerView3D.js +1 -1
  64. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  65. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  66. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  67. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  68. package/views/3d/support/pointsOfInterest/ContentGeometryUpdates.js +1 -1
  69. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  70. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  71. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  72. package/views/3d/webgl-engine/shaders/ShadowCastClear.glsl.js +5 -0
  73. package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +5 -0
  74. package/widgets/BatchAttributeForm/VisibleElements.js +1 -1
  75. package/widgets/BatchAttributeForm.js +1 -1
  76. package/widgets/Editor/EditorViewModel.js +1 -1
  77. package/widgets/Editor/UpdateFeaturesWorkflow.d.ts +4 -0
  78. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  79. package/widgets/Editor/UpdateFeaturesWorkflowData.d.ts +4 -0
  80. package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
  81. package/widgets/Editor/UpdateWorkflow.js +1 -1
  82. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  83. package/widgets/Editor/support/SketchController.js +1 -1
  84. package/widgets/Editor/workflowUtils.js +1 -1
  85. package/widgets/Editor.js +1 -1
  86. package/widgets/Search/SearchResultRenderer.js +1 -1
  87. package/widgets/Search/SearchViewModel.js +1 -1
  88. package/widgets/Search/searchResultRendererCSS.js +1 -1
  89. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  90. package/widgets/support/SelectionList/selectionListUtils.js +1 -1
  91. package/widgets/support/SelectionList.js +1 -1
  92. package/widgets/support/SelectionToolbar.js +1 -1
  93. package/assets/esri/core/workers/chunks/297d2c0a9d3f1e978318.js +0 -1
  94. package/assets/esri/core/workers/chunks/6b42bcfbb60432e3ed1f.js +0 -1
  95. package/assets/esri/core/workers/chunks/a9b1f4bf5eaa937943be.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import"../../intl.js";import{deprecatedProperty as t}from"../../core/deprecate.js";import{handlesGroup as o}from"../../core/handleUtils.js";import i from"../../core/Logger.js";import{removeMaybe as s}from"../../core/maybe.js";import{on as l}from"../../core/reactiveUtils.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import a from"../Widget.js";import{loadCalciteComponents as c}from"./componentsUtils.js";import{globalCss as p}from"./globalCss.js";import"./widgetUtils.js";import{messageBundle as d}from"./decorators/messageBundle.js";import{tsx as h}from"./jsxFactory.js";import u from"./SelectionToolbar/SelectionToolbarViewModel.js";import v from"./SelectionToolbar/VisibleElements.js";import{formatNumber as f}from"../../intl/number.js";const m="esri-selection-toolbar",g={base:m,container:`${m}__container`,toolButton:`${m}__tool-button`};let b=class extends a{constructor(e,t){super(e,t),this._viewModelHandlesGroup=null,this.defaultLassoToolOptions={createTool:"polygon",mode:"freehand"},this.defaultPointToolOptions={createTool:"point"},this.defaultRectangleToolOptions={createTool:"rectangle"},this.disabled=!1,this.layout="horizontal",this.messages=null,this.scale="s",this.toolConfigs=[],this.viewModel=new u,this.visibleElements=new v}initialize(){this._viewModelHandlesGroup=o([l((()=>this.viewModel),"selection-change",(e=>this.emit("selection-change",e))),l((()=>this.viewModel),"complete",(e=>this.emit("complete",e)))])}destroy(){this._viewModelHandlesGroup=s(this._viewModelHandlesGroup)}loadDependencies(){return c({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip")})}get _effectiveDisabled(){return this.disabled||"disabled"===this.state}get activeOperation(){return this.viewModel.activeOperation}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get effectiveSources(){return this.viewModel.effectiveSources}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layers(){return t(i.getLogger(this),"layers",{replacement:"Use SelectionToolbar.sources instead."}),this.viewModel.sources}set layers(e){t(i.getLogger(this),"layers",{replacement:"Use SelectionToolbar.sources instead."}),this.viewModel.sources=e}get layerViewPreferenceEnabled(){return this.viewModel.layerViewPreferenceEnabled}set layerViewPreferenceEnabled(e){this.viewModel.layerViewPreferenceEnabled=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get state(){return this.viewModel.state}get sources(){return this.viewModel.sources}set sources(e){this.viewModel.sources=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visibleToolCount(){const{view:e,toolConfigs:t,visibleElements:o}=this;return(t?.length??0)+("2d"===e?.type?(o.lassoTool?1:0)+(o.rectangleTool?1:0):0)}activate(e){if(this.cancel(),!this._effectiveDisabled)return this.activate(e)}activateTool(e){if(this.cancel(),!this._effectiveDisabled)switch(e){case"lasso":return this._activateTool("lasso");case"rectangle":return this._activateTool("rectangle");default:return this._activateTool(e)}}cancel(){this.viewModel.cancel()}render(){return h("div",{"aria-label":this.label,class:this.classes(g.base,p.widget)},h("div",{class:g.container},h("calcite-action-bar",{expandDisabled:!0,layout:"horizontal",scale:this.scale},this._renderDefaultTools(),this._renderCustomTools(),this._renderChip())))}_renderDefaultTools(){if("2d"===this.view?.type)return[this._renderPanAction(),this._renderPointTool(),this._renderRectangleTool(),this._renderLassoTool()]}_renderPanAction(){if(!this.visibleElements.pan)return;const e=this.messages.pan,t=`${this.id}-tool-pan`;return this._renderAction({active:!this.activeOperation,disabled:this._effectiveDisabled,icon:"pan",id:t,key:t,onclick:()=>this.cancel(),text:e,title:e})}_renderChip(){if(!this.visibleElements.chip)return;const{effectiveSelectionManager:e}=this,t=e?.count??0,o=f(t);return h("calcite-chip",{appearance:"outline",closable:t>0,closed:0===t,disabled:this._effectiveDisabled||0===t,label:o,scale:this.scale,slot:"actions-end",title:this.messages.clearSelection,onCalciteChipClose:()=>e?.clear()},o)}_renderCustomTools(){if(this.toolConfigs?.length)return this.toolConfigs.map((({toolName:e,icon:t,toolKey:o})=>this._renderToolWithTooltip(e,o,t)))}_renderPointTool(){if(this.visibleElements.pointTool)return this._renderToolWithTooltip("point","point","selection-set",this.messages.selectByPoint)}_renderLassoTool(){if(this.visibleElements.lassoTool)return this._renderToolWithTooltip("lasso","lasso","lasso-select",this.messages.selectByLasso)}_renderRectangleTool(){if(this.visibleElements.rectangleTool)return this._renderToolWithTooltip("rectangle","rectangle","cursor-marquee",this.messages.selectByRectangle)}_renderToolWithTooltip(e,t,o,i=e){const s=`${this.id}-tool-${t}`;return this._renderAction({active:this.activeOperation?.name===e,disabled:this._effectiveDisabled,icon:o||"selection",id:s,key:s,onclick:()=>this._toggleTool(e),text:i,title:i})}_renderAction(e){return h("calcite-action",{...e,bind:this,class:g.toolButton,scale:this.scale})}_activateTool(e){const t=this._getToolOptions(e);if(t)return this.viewModel.activate(t)}_toggleTool(e){const{activeOperation:t}=this;if(t){const o=t.name;if(this.cancel(),o===e)return}this._activateTool(e)}_getToolOptions(e){return"lasso"===e?this.defaultLassoToolOptions:"point"===e?this.defaultPointToolOptions:"rectangle"===e?this.defaultRectangleToolOptions:this.toolConfigs.find((t=>t.toolName===e))}};e([r()],b.prototype,"_effectiveDisabled",null),e([r()],b.prototype,"activeOperation",null),e([r()],b.prototype,"defaultLassoToolOptions",void 0),e([r()],b.prototype,"defaultPointToolOptions",void 0),e([r()],b.prototype,"defaultRectangleToolOptions",void 0),e([r()],b.prototype,"disabled",void 0),e([r()],b.prototype,"effectiveSelectionManager",null),e([r()],b.prototype,"effectiveSources",null),e([r()],b.prototype,"label",null),e([r()],b.prototype,"layers",null),e([r()],b.prototype,"layerViewPreferenceEnabled",null),e([r()],b.prototype,"layout",void 0),e([r(),d("esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar")],b.prototype,"messages",void 0),e([r()],b.prototype,"scale",void 0),e([r()],b.prototype,"selectionManager",null),e([r()],b.prototype,"state",null),e([r()],b.prototype,"sources",null),e([r()],b.prototype,"toolConfigs",void 0),e([r()],b.prototype,"view",null),e([r()],b.prototype,"viewModel",void 0),e([r({type:v,nonNullable:!0})],b.prototype,"visibleElements",void 0),e([r()],b.prototype,"visibleToolCount",null),b=e([n("esri.widgets.support.SelectionToolbar")],b);export{b as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import"../../intl.js";import{deprecatedProperty as t}from"../../core/deprecate.js";import{handlesGroup as o}from"../../core/handleUtils.js";import i from"../../core/Logger.js";import{removeMaybe as s}from"../../core/maybe.js";import{on as l}from"../../core/reactiveUtils.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import a from"../Widget.js";import{loadCalciteComponents as c}from"./componentsUtils.js";import{globalCss as p}from"./globalCss.js";import"./widgetUtils.js";import{messageBundle as d}from"./decorators/messageBundle.js";import{tsx as h}from"./jsxFactory.js";import u from"./SelectionToolbar/SelectionToolbarViewModel.js";import v from"./SelectionToolbar/VisibleElements.js";import{formatNumber as f}from"../../intl/number.js";const m="esri-selection-toolbar",g={base:m,container:`${m}__container`,toolButton:`${m}__tool-button`};let b=class extends a{constructor(e,t){super(e,t),this._viewModelHandlesGroup=null,this.defaultLassoToolOptions={createTool:"polygon",mode:"freehand"},this.defaultPointToolOptions={createTool:"point"},this.defaultRectangleToolOptions={createTool:"rectangle"},this.disabled=!1,this.layout="horizontal",this.messages=null,this.scale="s",this.toolConfigs=[],this.viewModel=new u,this.visibleElements=new v}initialize(){this._viewModelHandlesGroup=o([l((()=>this.viewModel),"selection-change",(e=>this.emit("selection-change",e))),l((()=>this.viewModel),"complete",(e=>this.emit("complete",e)))])}destroy(){this._viewModelHandlesGroup=s(this._viewModelHandlesGroup)}loadDependencies(){return c({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip")})}get _effectiveDisabled(){return this.disabled||"disabled"===this.state}get activeOperation(){return this.viewModel.activeOperation}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get effectiveSources(){return this.viewModel.effectiveSources}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layers(){return t(i.getLogger(this),"layers",{replacement:"Use SelectionToolbar.sources instead."}),this.viewModel.sources}set layers(e){t(i.getLogger(this),"layers",{replacement:"Use SelectionToolbar.sources instead."}),this.viewModel.sources=e}get layerViewPreferenceEnabled(){return this.viewModel.layerViewPreferenceEnabled}set layerViewPreferenceEnabled(e){this.viewModel.layerViewPreferenceEnabled=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get state(){return this.viewModel.state}get sources(){return this.viewModel.sources}set sources(e){this.viewModel.sources=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visibleToolCount(){const{view:e,toolConfigs:t,visibleElements:o}=this;return(t?.length??0)+("2d"===e?.type?(o.lassoTool?1:0)+(o.rectangleTool?1:0):0)}activate(e){if(this.cancel(),!this._effectiveDisabled)return this.viewModel.activate(e)}activateTool(e){if(this.cancel(),!this._effectiveDisabled)switch(e){case"lasso":return this._activateTool("lasso");case"rectangle":return this._activateTool("rectangle");default:return this._activateTool(e)}}cancel(){this.viewModel.cancel()}render(){return h("div",{"aria-label":this.label,class:this.classes(g.base,p.widget)},h("div",{class:g.container},h("calcite-action-bar",{expandDisabled:!0,layout:"horizontal",scale:this.scale},this._renderDefaultTools(),this._renderCustomTools(),this._renderChip())))}_renderDefaultTools(){if("2d"===this.view?.type)return[this._renderPanAction(),this._renderPointTool(),this._renderRectangleTool(),this._renderLassoTool()]}_renderPanAction(){if(!this.visibleElements.pan)return;const e=this.messages.pan,t=`${this.id}-tool-pan`;return this._renderAction({active:!this.activeOperation,disabled:this._effectiveDisabled,icon:"pan",id:t,key:t,onclick:()=>this.cancel(),text:e,title:e})}_renderChip(){if(!this.visibleElements.chip)return;const{effectiveSelectionManager:e}=this,t=e?.count??0,o=f(t);return h("calcite-chip",{appearance:"outline",closable:t>0,closed:0===t,disabled:this._effectiveDisabled||0===t,label:o,scale:this.scale,slot:"actions-end",title:this.messages.clearSelection,onCalciteChipClose:()=>e?.clear()},o)}_renderCustomTools(){if(this.toolConfigs?.length)return this.toolConfigs.map((({toolName:e,icon:t,toolKey:o})=>this._renderToolWithTooltip(e,o,t)))}_renderPointTool(){if(this.visibleElements.pointTool)return this._renderToolWithTooltip("point","point","selection-set",this.messages.selectByPoint)}_renderLassoTool(){if(this.visibleElements.lassoTool)return this._renderToolWithTooltip("lasso","lasso","lasso-select",this.messages.selectByLasso)}_renderRectangleTool(){if(this.visibleElements.rectangleTool)return this._renderToolWithTooltip("rectangle","rectangle","cursor-marquee",this.messages.selectByRectangle)}_renderToolWithTooltip(e,t,o,i=e){const s=`${this.id}-tool-${t}`;return this._renderAction({active:this.activeOperation?.name===e,disabled:this._effectiveDisabled,icon:o||"selection",id:s,key:s,onclick:()=>this._toggleTool(e),text:i,title:i})}_renderAction(e){return h("calcite-action",{...e,bind:this,class:g.toolButton,scale:this.scale})}_activateTool(e){const t=this._getToolOptions(e);if(t)return this.viewModel.activate(t)}_toggleTool(e){const{activeOperation:t}=this;if(t){const o=t.name;if(this.cancel(),o===e)return}this._activateTool(e)}_getToolOptions(e){return"lasso"===e?this.defaultLassoToolOptions:"point"===e?this.defaultPointToolOptions:"rectangle"===e?this.defaultRectangleToolOptions:this.toolConfigs.find((t=>t.toolName===e))}};e([r()],b.prototype,"_effectiveDisabled",null),e([r()],b.prototype,"activeOperation",null),e([r()],b.prototype,"defaultLassoToolOptions",void 0),e([r()],b.prototype,"defaultPointToolOptions",void 0),e([r()],b.prototype,"defaultRectangleToolOptions",void 0),e([r()],b.prototype,"disabled",void 0),e([r()],b.prototype,"effectiveSelectionManager",null),e([r()],b.prototype,"effectiveSources",null),e([r()],b.prototype,"label",null),e([r()],b.prototype,"layers",null),e([r()],b.prototype,"layerViewPreferenceEnabled",null),e([r()],b.prototype,"layout",void 0),e([r(),d("esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar")],b.prototype,"messages",void 0),e([r()],b.prototype,"scale",void 0),e([r()],b.prototype,"selectionManager",null),e([r()],b.prototype,"state",null),e([r()],b.prototype,"sources",null),e([r()],b.prototype,"toolConfigs",void 0),e([r()],b.prototype,"view",null),e([r()],b.prototype,"viewModel",void 0),e([r({type:v,nonNullable:!0})],b.prototype,"visibleElements",void 0),e([r()],b.prototype,"visibleToolCount",null),b=e([n("esri.widgets.support.SelectionToolbar")],b);export{b as default};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1806],{2073:(e,t,r)=>{r.d(t,{$n:()=>A,$r:()=>m,EM:()=>f,Ec:()=>N,JJ:()=>h,Mm:()=>M,OC:()=>R,Sr:()=>p,UO:()=>a,Vj:()=>G,WU:()=>E,Y8:()=>s,Z7:()=>l,_6:()=>v,aJ:()=>u,dd:()=>b,dn:()=>d,et:()=>S,fe:()=>w,gD:()=>T,hE:()=>c,hY:()=>o,iM:()=>_,mt:()=>g,ow:()=>y,vS:()=>P});var n=r(66552);const i={esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"},o=(0,n.O)()(i),s=(0,n.O)()({...i,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),a=(0,n.O)()({esriAcres:"international-acres",esriAcresUS:"us-acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-international-feet",esriSquareFeetUS:"square-us-feet",esriSquareInches:"square-international-inches",esriSquareInchesUS:"square-us-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-international-miles",esriSquareMilesUS:"square-us-miles",esriSquareMillimeters:"square-millimeters",esriSquareYards:"square-international-yards",esriSquareYardsUS:"square-us-yards",esriUnknownAreaUnits:"unknown"}),l=(0,n.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),d=(0,n.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"}),u=(0,n.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),p=(0,n.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),c=((0,n.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,n.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),y=((0,n.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,n.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,n.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),h=(0,n.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),f=(0,n.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),m=(0,n.O)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),g=(0,n.O)()({1:"right",2:"left"},{useNumericKeys:!0}),_=(0,n.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),w=(0,n.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),v=(0,n.O)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation",1007:"lane"},{useNumericKeys:!0}),T=(0,n.O)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),A=(0,n.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),b=(0,n.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),M=(0,n.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),S=(0,n.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),R=(0,n.O)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),P=(0,n.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),G=(0,n.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),E=(0,n.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),N=(0,n.O)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"})},22671:(e,t,r)=>{r.d(t,{A:()=>_});var n,i=r(90237),o=r(52106),s=r(66552),a=r(25482),l=r(4718),d=r(10107),u=(r(44208),r(53966),r(36005)),p=r(40608),c=r(43937),y=r(16930),h=r(65864),f=r(50498),m=r(20437);const g=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=n=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,h.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=y.A.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e?.[r];n.geometry=t?.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,i]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,i],scale:[o,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const d=this._getHydrationFunction(e,(e=>e*o+n),(e=>i-e*s),a,l);for(const{geometry:e}of t)null!=e&&d&&d(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const n=y.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],s=r.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=n);const l=o.aggregateGeometries,d=s.aggregateGeometries;if(l&&null!=d)for(const e in d){const t=d[e],r=l[e],i=r?.spatialReference;null==t||i||(t.spatialReference=n)}i.push(s)}return i}_quantizePoints(e,t,r){let n,i;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===n&&s===i||(o.push([e-n,s-i]),n=e,i=s)}else n=t(a[0]),i=r(a[1]),o.push([n,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,h.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=n.length;e<o;e++){const o=n[e],s=this._quantizePoints(o,t,r);s&&i.push(s)}return i.length>0?((0,h.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,h.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,n=o.length;e<n;e++){const n=o[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=i(r[3])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,n=o.length;e<n;e++){const n=o[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2]),t[3]=i(t[3])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,d.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,i._)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,d.MZ)({type:[o.A],json:{write:!0}})],_.prototype,"features",void 0),(0,i._)([(0,u.w)("features")],_.prototype,"readFeatures",null),(0,i._)([(0,d.MZ)({type:[m.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,i._)([(0,d.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,i._)([(0,c.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,i._)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,i._)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,i._)([(0,d.MZ)({types:f.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,i._)([(0,u.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,i._)([(0,d.MZ)({type:y.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,i._)([(0,c.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,i._)([(0,d.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=n=(0,i._)([(0,p.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0},35448:(e,t,r)=>{var n,i,o,s,a,l,d;r.d(t,{Eq:()=>n,bV:()=>o,nP:()=>a,r5:()=>i,ti:()=>l,vy:()=>d,wr:()=>s}),function(e){e[e.Regular=0]="Regular",e[e.Provenance=1]="Provenance",e[e.Document=2]="Document"}(n||(n={})),function(e){e[e.esriFieldTypeSmallInteger=0]="esriFieldTypeSmallInteger",e[e.esriFieldTypeInteger=1]="esriFieldTypeInteger",e[e.esriFieldTypeSingle=2]="esriFieldTypeSingle",e[e.esriFieldTypeDouble=3]="esriFieldTypeDouble",e[e.esriFieldTypeString=4]="esriFieldTypeString",e[e.esriFieldTypeDate=5]="esriFieldTypeDate",e[e.esriFieldTypeOID=6]="esriFieldTypeOID",e[e.esriFieldTypeGeometry=7]="esriFieldTypeGeometry",e[e.esriFieldTypeBlob=8]="esriFieldTypeBlob",e[e.esriFieldTypeRaster=9]="esriFieldTypeRaster",e[e.esriFieldTypeGUID=10]="esriFieldTypeGUID",e[e.esriFieldTypeGlobalID=11]="esriFieldTypeGlobalID",e[e.esriFieldTypeXML=12]="esriFieldTypeXML",e[e.esriFieldTypeBigInteger=13]="esriFieldTypeBigInteger",e[e.esriFieldTypeDateOnly=14]="esriFieldTypeDateOnly",e[e.esriFieldTypeTimeOnly=15]="esriFieldTypeTimeOnly",e[e.esriFieldTypeTimestampOffset=16]="esriFieldTypeTimestampOffset"}(i||(i={})),function(e){e[e.esriGeometryNull=0]="esriGeometryNull",e[e.esriGeometryPoint=1]="esriGeometryPoint",e[e.esriGeometryMultipoint=2]="esriGeometryMultipoint",e[e.esriGeometryPolyline=3]="esriGeometryPolyline",e[e.esriGeometryPolygon=4]="esriGeometryPolygon",e[e.esriGeometryEnvelope=5]="esriGeometryEnvelope",e[e.esriGeometryAny=7]="esriGeometryAny",e[e.esriGeometryMultiPatch=9]="esriGeometryMultiPatch"}(o||(o={})),function(e){e[e.esriMethodHintUNSPECIFIED=0]="esriMethodHintUNSPECIFIED",e[e.esriUUIDESRI=1]="esriUUIDESRI",e[e.esriUUIDRFC4122=2]="esriUUIDRFC4122"}(s||(s={})),function(e){e[e.esriTypeUNSPECIFIED=0]="esriTypeUNSPECIFIED",e[e.esriTypeEntity=1]="esriTypeEntity",e[e.esriTypeRelationship=2]="esriTypeRelationship",e[e.esriTypeBoth=4]="esriTypeBoth"}(a||(a={})),function(e){e[e.esriGraphPropertyUNSPECIFIED=0]="esriGraphPropertyUNSPECIFIED",e[e.esriGraphPropertyRegular=1]="esriGraphPropertyRegular",e[e.esriGraphPropertyDocumentName=2]="esriGraphPropertyDocumentName",e[e.esriGraphPropertyDocumentTitle=3]="esriGraphPropertyDocumentTitle",e[e.esriGraphPropertyDocumentUrl=4]="esriGraphPropertyDocumentUrl",e[e.esriGraphPropertyDocumentText=5]="esriGraphPropertyDocumentText",e[e.esriGraphPropertyDocumentKeywords=6]="esriGraphPropertyDocumentKeywords",e[e.esriGraphPropertyDocumentContentType=7]="esriGraphPropertyDocumentContentType",e[e.esriGraphPropertyDocumentMetadata=8]="esriGraphPropertyDocumentMetadata",e[e.esriGraphPropertyDocumentFileExtension=9]="esriGraphPropertyDocumentFileExtension",e[e.esriGraphPropertyProvenanceInstanceId=10]="esriGraphPropertyProvenanceInstanceId",e[e.esriGraphPropertyProvenanceSourceType=11]="esriGraphPropertyProvenanceSourceType",e[e.esriGraphPropertyProvenanceSourceName=12]="esriGraphPropertyProvenanceSourceName",e[e.esriGraphPropertyProvenanceSource=13]="esriGraphPropertyProvenanceSource",e[e.esriGraphPropertyProvenanceComment=14]="esriGraphPropertyProvenanceComment",e[e.esriGraphPropertyProvenanceTypeName=15]="esriGraphPropertyProvenanceTypeName",e[e.esriGraphPropertyProvenancePropertyName=16]="esriGraphPropertyProvenancePropertyName"}(l||(l={})),function(e){e[e.esriIdentifierInfoTypeUNSPECIFIED=0]="esriIdentifierInfoTypeUNSPECIFIED",e[e.esriIdentifierInfoTypeDatabaseNative=1]="esriIdentifierInfoTypeDatabaseNative",e[e.esriIdentifierInfoTypeUniformProperty=2]="esriIdentifierInfoTypeUniformProperty"}(d||(d={}))},37807:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(90237),i=r(66552),o=r(25482),s=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const l=new i.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let d=class extends o.A{constructor(e){super(e),this.description=null,this.type=null}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,n._)([(0,s.MZ)({type:String,json:{read:l.read,write:l.write}})],d.prototype,"type",void 0),d=(0,n._)([(0,a.$)("esri.rest.support.GPMessage")],d);const u=d},45724:(e,t,r)=>{r.d(t,{I:()=>l});var n=r(2741),i=r(44208);const o="esri/rest/knowledgeGraph/wasmInterface/";let s,a=null;async function l(){const e=a??s;if(e)return e;const t=!!(0,i.A)("wasm-simd");return s=d(t),s}async function d(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367)).then((e=>e.a));return e({locateFile:e=>(0,n.s)(o+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013)).then((e=>e.a));return t({locateFile:e=>(0,n.s)(o+e)})}},51806:(e,t,r)=>{r.r(t),r.d(t,{_checkAuthentication:()=>Rt,_esriRequestWrapper:()=>St,_fetchWrapper:()=>bt,_getClientDataCacheCopy:()=>ot,_setMaxQueryParsingDurationForTesting:()=>Nt,_submitJobWrapper:()=>Mt,clearClientDataCache:()=>At,clientDataCache:()=>it,executeAddNamedTypes:()=>lt,executeApplyEdits:()=>at,executeDeleteNamedType:()=>dt,executeFindPaths:()=>vt,executeFindPathsAsynchronous:()=>wt,executeQuery:()=>ut,executeQueryStreaming:()=>pt,executeSearch:()=>ct,executeSearchStreaming:()=>yt,fetchAllClientDataKeys:()=>ht,fetchAsynchronousFindPathsResultData:()=>Tt,fetchClientDataAtKeys:()=>ft,fetchKnowledgeGraph:()=>mt,kgRestServices:()=>st,refreshDataModel:()=>gt,refreshServiceDefinition:()=>_t});var n,i=r(70333),o=r(78888),s=r(49186),a=r(53966),l=r(74887),d=r(91075),u=r(16930),p=r(90237),c=r(69622),y=r(10107),h=r(56507),f=(r(44208),r(87811),r(40608)),m=r(5443);let g=n=class extends c.A{constructor(e){super(e),this.outSpatialReference=null,this.processExtent=null,this.processSpatialReference=null,this.returnColumnName=!1,this.returnFeatureCollection=!1,this.returnM=!1,this.returnZ=!1}static from(e){return(0,h.PZ)(n,e)}};(0,p._)([(0,y.MZ)({type:u.A})],g.prototype,"outSpatialReference",void 0),(0,p._)([(0,y.MZ)({type:m.A})],g.prototype,"processExtent",void 0),(0,p._)([(0,y.MZ)({type:u.A})],g.prototype,"processSpatialReference",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnColumnName",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnFeatureCollection",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnM",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnZ",void 0),g=n=(0,p._)([(0,f.$)("esri.rest.geoprocessor.GPOptions")],g);var _=r(17136),w=r(20437),v=r(25482);let T=class extends v.A{constructor(){super(...arguments),this.extent=null,this.height=null,this.href=null,this.opacity=1,this.rotation=0,this.scale=null,this.visible=!0,this.width=null}};(0,p._)([(0,y.MZ)({type:m.A})],T.prototype,"extent",void 0),(0,p._)([(0,y.MZ)()],T.prototype,"height",void 0),(0,p._)([(0,y.MZ)()],T.prototype,"href",void 0),(0,p._)([(0,y.MZ)()],T.prototype,"opacity",void 0),(0,p._)([(0,y.MZ)()],T.prototype,"rotation",void 0),(0,p._)([(0,y.MZ)()],T.prototype,"scale",void 0),(0,p._)([(0,y.MZ)()],T.prototype,"visible",void 0),(0,p._)([(0,y.MZ)()],T.prototype,"width",void 0),T=(0,p._)([(0,f.$)("esri.layers.support.MapImage")],T);var A=r(2272),b=r(93223),M=r(2073);let S=class extends v.A{constructor(e){super(e),this.area=0,this.units=null}};(0,p._)([(0,y.MZ)({json:{write:!0}})],S.prototype,"area",void 0),(0,p._)([(0,b.e)(M.UO)],S.prototype,"units",void 0),S=(0,p._)([(0,f.$)("esri.rest.support.ArealUnit")],S);let R=class extends v.A{constructor(e){super(e),this.itemId=null,this.url=null}};(0,p._)([(0,y.MZ)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],R.prototype,"itemId",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],R.prototype,"url",void 0),R=(0,p._)([(0,f.$)("esri.rest.support.DataFile")],R);var P=r(22671);let G=class extends v.A{constructor(e){super(e),this.distance=0,this.units=null}};(0,p._)([(0,y.MZ)({json:{write:!0}})],G.prototype,"distance",void 0),(0,p._)([(0,b.e)(M.Y8)],G.prototype,"units",void 0),G=(0,p._)([(0,f.$)("esri.rest.support.LinearUnit")],G);var E=r(66552);const N="multi-value-",k=new E.J({GPArealUnit:"areal-unit",GPBoolean:"boolean",GPComposite:"composite",GPDataFile:"data-file",GPDate:"date",GPDouble:"double",GPFeatureRecordSetLayer:"feature-record-set-layer",Field:"field",GPLinearUnit:"linear-unit",GPLong:"long",GPRasterData:"raster-data",GPRasterDataLayer:"raster-data-layer",GPRecordSet:"record-set",GPString:"string",GPValueTable:"value-table","GPMultiValue:GPArealUnit":`${N}areal-unit`,"GPMultiValue:GPBoolean":`${N}boolean`,"GPMultiValue:GPComposite":`${N}composite`,"GPMultiValue:GPDataFile":`${N}data-file`,"GPMultiValue:GPDate":`${N}date`,"GPMultiValue:GPDouble":`${N}double`,"GPMultiValue:GPFeatureRecordSetLayer":`${N}feature-record-set-layer`,"GPMultiValue:Field":`${N}field`,"GPMultiValue:GPLinearUnit":`${N}linear-unit`,"GPMultiValue:GPLong":`${N}long`,"GPMultiValue:GPRasterData":`${N}raster-data`,"GPMultiValue:GPRasterDataLayer":`${N}raster-data-layer`,"GPMultiValue:GPRecordSet":`${N}record-set`,"GPMultiValue:GPString":`${N}string`});let D=class extends v.A{constructor(e){super(e),this.dataType=null,this.paramName=null,this.value=null}};(0,p._)([(0,b.e)(k,{ignoreUnknown:!1})],D.prototype,"dataType",void 0),(0,p._)([(0,y.MZ)()],D.prototype,"paramName",void 0),(0,p._)([(0,y.MZ)()],D.prototype,"value",void 0),D=(0,p._)([(0,f.$)("esri.rest.support.ParameterValue")],D);var I=r(36005);let x=class extends v.A{constructor(e){super(e),this.format=null,this.itemId=null,this.type=null,this.url=null}readType(e){return"ImageService"===e?"image-service":null}};async function O(e,t){switch(e){case"areal-unit":return S.fromJSON(t);case"boolean":case"double":case"long":case"string":case"value-table":return t;case"date":return new Date(t);case"data-file":return R.fromJSON(t);case"linear-unit":return G.fromJSON(t);case"feature-record-set-layer":if("url"in t)return R.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(13),r.e(8988),r.e(1214),r.e(9953),r.e(1956),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(3600),r.e(2470)]).then(r.bind(r,13600))).default),{layerDefinition:n,featureSet:i}=t;return e.read({layerDefinition:n,featureSet:i},{origin:"portal-item"}),e.spatialReference=u.A.fromJSON(i.spatialReference??n.spatialReference??n.extent.spatialReference),e}return P.A.fromJSON(t);case"record-set":return"url"in t?R.fromJSON(t):P.A.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?T.fromJSON(t.mapImage):x.fromJSON(t);case"field":return w.A.fromJSON(t)}}async function j(e){const t=k.fromJSON(e.dataType),{paramName:r}=e,n=function(e){return e.startsWith(N)}(t)?await async function(e,t){const r=function(e){return e.replace(N,"")}(e),n="composite"===r?t.map((e=>O(k.fromJSON(e.dataType),e.value))):t.map((e=>O(r,e)));return Promise.all(n)}(t,e.value):await O(t,e.value);return new D({dataType:t,paramName:r,value:n})}function C(e,t,r){for(const t in e){const r=e[t];Array.isArray(r)?e[t]=JSON.stringify(r.map((e=>C({item:e},!0).item))):r instanceof Date&&(e[t]=r.getTime())}return(0,A.lF)(e,t,r)}(0,p._)([(0,y.MZ)()],x.prototype,"format",void 0),(0,p._)([(0,y.MZ)({json:{name:"itemID",write:!0}})],x.prototype,"itemId",void 0),(0,p._)([(0,y.MZ)()],x.prototype,"type",void 0),(0,p._)([(0,I.w)("type")],x.prototype,"readType",null),(0,p._)([(0,y.MZ)({json:{write:!0}})],x.prototype,"url",void 0),x=(0,p._)([(0,f.$)("esri.rest.support.RasterData")],x);var F,Z=r(37807);const U=(0,E.O)()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),q=1e3;let L=class extends v.A{static{F=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){const{jobId:t,sourceUrl:r}=this,{path:n}=(0,A.Dl)(r),i={...this.requestOptions,...e,query:{f:"json"}},s=`${n}/jobs/${t}/cancel`,{data:a}=await(0,o.A)(s,i),{messages:d,jobStatus:u,progress:p}=F.fromJSON(a);return this.set({messages:d,jobStatus:u,progress:p}),"job-cancelled"===u?this:new Promise(((t,r)=>{(0,l.u7)(i.signal,(()=>{this.clearCancelJobTimer(),r((0,l.NK)())})),this.clearCancelJobTimer();const n=()=>{this._cancelJobTimer||r((0,l.NK)()),this.checkJobStatus(e).then((({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(n,q);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":r(this);break;case"job-cancelled":t(this)}})).catch((e=>{r(e)}))};this._cancelJobTimer=setTimeout(n,q)}))}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:t}=(0,A.Dl)(this.sourceUrl),r={...this.requestOptions,...e,query:{f:"json"}},n=`${t}/jobs/${this.jobId}`,{data:i}=await(0,o.A)(n,r),{messages:s,jobStatus:a,progress:l}=F.fromJSON(i);return this.set({messages:s,jobStatus:a,progress:l}),this}async fetchResultData(e,t,r){t=g.from(t||{});const{returnColumnName:n,returnFeatureCollection:i,returnM:s,returnZ:a,outSpatialReference:l}=t,{path:d}=(0,A.Dl)(this.sourceUrl),u=C({returnColumnName:n||null,returnFeatureCollection:i||null,returnM:s||null,returnZ:a||null,outSR:l,returnType:"data",f:"json"},null),p={...this.requestOptions,...r,query:u},c=`${d}/jobs/${this.jobId}/results/${e}`,{data:y}=await(0,o.A)(c,p);return j(y)}async fetchResultImage(e,t,r){const{path:n}=(0,A.Dl)(this.sourceUrl),i=C({...t.toJSON(),f:"json"}),s={...this.requestOptions,...r,query:i},a=`${n}/jobs/${this.jobId}/results/${e}`,{data:l}=await(0,o.A)(a,s);return j(l)}async fetchResultMapImageLayer(){const{path:e}=(0,A.Dl)(this.sourceUrl),t=e.indexOf("/GPServer/"),n=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(13),r.e(8988),r.e(1214),r.e(1956),r.e(4796),r.e(4111),r.e(364),r.e(4341),r.e(7656),r.e(788)]).then(r.bind(r,7656))).default)({url:n})}async waitForJobCompletion(e={}){const{interval:t=q,signal:r,statusCallback:n}=e;return new Promise(((e,i)=>{(0,l.u7)(r,(()=>{this.clearJobCompletionTimer(),i((0,l.NK)())})),this.clearJobCompletionTimer();const o=()=>{this._jobCompletionTimer||i((0,l.NK)()),this.checkJobStatus().then((({jobStatus:r})=>{switch(r){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":n&&n(this),this._jobCompletionTimer=setTimeout(o,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":i(this);break;default:this._jobCompletionTimer=setTimeout(o,t)}})).catch((e=>{i(e)}))};this._jobCompletionTimer=setTimeout(o,t)}))}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};(0,p._)([(0,y.MZ)()],L.prototype,"jobId",void 0),(0,p._)([(0,b.e)(U,{ignoreUnknown:!1})],L.prototype,"jobStatus",void 0),(0,p._)([(0,y.MZ)({type:[Z.A]})],L.prototype,"messages",void 0),(0,p._)([(0,y.MZ)()],L.prototype,"progress",void 0),(0,p._)([(0,y.MZ)()],L.prototype,"requestOptions",void 0),(0,p._)([(0,y.MZ)({json:{write:!0}})],L.prototype,"sourceUrl",void 0),L=F=(0,p._)([(0,f.$)("esri.rest.support.JobInfo")],L);let z=class extends c.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1}};(0,p._)([(0,y.MZ)()],z.prototype,"headerKeys",void 0),(0,p._)([(0,y.MZ)()],z.prototype,"outSpatialReference",void 0),(0,p._)([(0,y.MZ)()],z.prototype,"exceededTransferLimit",void 0),z=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],z);let J=class extends c.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new z}};(0,p._)([(0,y.MZ)()],J.prototype,"resultRows",void 0),(0,p._)([(0,y.MZ)()],J.prototype,"resultHeader",void 0),J=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResult")],J);let K=class extends c.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new z}};(0,p._)([(0,y.MZ)()],K.prototype,"resultRowsStream",void 0),(0,p._)([(0,y.MZ)()],K.prototype,"resultHeader",void 0),K=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],K);let $=class extends v.A{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=!0,this.description="",this.fieldNames=[]}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],$.prototype,"name",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],$.prototype,"unique",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],$.prototype,"ascending",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],$.prototype,"description",void 0),(0,p._)([(0,y.MZ)({type:[String],json:{write:!0}})],$.prototype,"fieldNames",void 0),$=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.FieldIndex")],$);let B=class extends v.A{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=!0,this.required=!1,this.defaultVisibility=!0,this.systemMaintained=null,this.role="esriGraphPropertyUNSPECIFIED",this.defaultValue=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],B.prototype,"name",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],B.prototype,"alias",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],B.prototype,"fieldType",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],B.prototype,"geometryType",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],B.prototype,"hasM",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],B.prototype,"hasZ",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],B.prototype,"nullable",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],B.prototype,"editable",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],B.prototype,"required",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],B.prototype,"defaultVisibility",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],B.prototype,"systemMaintained",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],B.prototype,"role",void 0),(0,p._)([(0,y.MZ)({json:{write:!0}})],B.prototype,"defaultValue",void 0),B=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphProperty")],B);let V=class extends v.A{constructor(e){super(e),this.name=null,this.alias=null,this.role="Regular",this.strict=null,this.properties=[],this.fieldIndexes=[],this.type=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],V.prototype,"name",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],V.prototype,"alias",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],V.prototype,"role",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"strict",void 0),(0,p._)([(0,y.MZ)({type:[B],json:{write:!0}})],V.prototype,"properties",void 0),(0,p._)([(0,y.MZ)({type:[$],json:{write:!0}})],V.prototype,"fieldIndexes",void 0),V=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphObjectType")],V);let Y=class extends V{constructor(e){super(e),this.type="entity"}};Y=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.EntityType")],Y);let H=class extends V{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,p._)([(0,y.MZ)({json:{write:!0}})],H.prototype,"endPoints",void 0),H=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.RelationshipType")],H);let Q=class extends v.A{constructor(e){super(e),this.value=null,this.behavior=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],Q.prototype,"value",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],Q.prototype,"behavior",void 0),Q=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],Q);let W=class extends v.A{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=[],this.entityTypes=[],this.relationshipTypes=[],this.metaEntityTypes=[],this.provenanceSourceTypeValues=[]}};(0,p._)([(0,y.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],W.prototype,"timestamp",void 0),(0,p._)([(0,y.MZ)({type:u.A,json:{write:!0}})],W.prototype,"spatialReference",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"strict",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"objectIdField",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"globalIdField",void 0),(0,p._)([(0,y.MZ)()],W.prototype,"arcgisManaged",void 0),(0,p._)([(0,y.MZ)()],W.prototype,"identifierInfo",void 0),(0,p._)([(0,y.MZ)()],W.prototype,"searchIndexes",void 0),(0,p._)([(0,y.MZ)({type:[Y],json:{write:!0}})],W.prototype,"entityTypes",void 0),(0,p._)([(0,y.MZ)({type:[H],json:{write:!0}})],W.prototype,"relationshipTypes",void 0),(0,p._)([(0,y.MZ)({type:[Y],json:{write:!0}})],W.prototype,"metaEntityTypes",void 0),(0,p._)([(0,y.MZ)({type:[Q],json:{write:!0}})],W.prototype,"provenanceSourceTypeValues",void 0),W=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.DataModel")],W);let X=class extends v.A{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1,this.supportsProvenance=!1}};(0,p._)([(0,y.MZ)({type:[String],json:{write:!0}})],X.prototype,"capabilities",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"supportsSearch",void 0),(0,p._)([(0,y.MZ)({type:[String],json:{write:!0}})],X.prototype,"supportedQueryFormats",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"allowGeometryUpdates",void 0),(0,p._)([(0,y.MZ)({type:Number,json:{write:!0}})],X.prototype,"searchMaxRecordCount",void 0),(0,p._)([(0,y.MZ)({type:Object,json:{write:!0}})],X.prototype,"serviceCapabilities",void 0),(0,p._)([(0,y.MZ)({type:Number,json:{write:!0}})],X.prototype,"maxRecordCount",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],X.prototype,"description",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],X.prototype,"copyrightText",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],X.prototype,"units",void 0),(0,p._)([(0,y.MZ)({type:u.A,json:{write:!0}})],X.prototype,"spatialReference",void 0),(0,p._)([(0,y.MZ)({type:Number,json:{write:!0}})],X.prototype,"currentVersion",void 0),(0,p._)([(0,y.MZ)({type:Object,json:{write:!0}})],X.prototype,"dateFieldsTimeReference",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],X.prototype,"serviceItemId",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"supportsDocuments",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"dataEditingNotSupported",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"schemaEditingNotSupported",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],X.prototype,"supportsProvenance",void 0),X=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.ServiceDefinition")],X);let ee=class extends v.A{constructor(e){super(e),this.url=null,this.dataModel=null,this.serviceDefinition=null}};function te(e,t,r){if(0!==e.error_code)throw new s.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function re(e){return e?.error_code?new s.A("knowledgeGraphService:server-or-decoding-error",e.error_message,{errorCode:e.error_code}):void 0}function ne(e,t,r,n){const i=new r.ClientDataKey;i.deleteLater(),i.key_string=e;const o=new r.ClientDataFetchRequestParameter;o.deleteLater(),o.set_key(i);const s=t.get(e);return s&&!n&&(o.v_tag={v_tag:s.version}),o}(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ee.prototype,"url",void 0),(0,p._)([(0,y.MZ)({type:W,json:{write:!0}})],ee.prototype,"dataModel",void 0),(0,p._)([(0,y.MZ)({type:X,json:{write:!0}})],ee.prototype,"serviceDefinition",void 0),ee=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.KnowledgeGraph")],ee);var ie,oe,se,ae=r(45724),le=r(48526),de=r(86738),ue=r(39829),pe=r(82799);function ce(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(fe(e,t))})),r}function ye(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,i]of Object.entries(e))r.set_key_value(n,fe(i,t));return r}function he(e,t){if(e instanceof le.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],i=[];i[0]=e.points.length;let o=0;return e.points.forEach((e=>{e.forEach((e=>{n[o]=e,o++}))})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(i),r}(e,t);if(e instanceof de.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],i=[];i[0]=1,n[0]=e.x,n[1]=e.y;let o=2;return e.hasZ&&(n[o]=e.z,o++),e.hasM&&(n[o]=e.m,o++),r.coords=new Float64Array(n),r.lengths=new Uint32Array(i),r}(e,t);if(e instanceof pe.A||e instanceof ue.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],i=[];let o=[];e instanceof pe.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,o=e.paths):e instanceof ue.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,o=e.rings);let s=0,a=0;return o.forEach((e=>{let t=0;e.forEach((e=>{t++,e.forEach((e=>{n[a]=e,a++}))})),i[s]=t,s++})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(i),r}(e,t);throw new s.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function fe(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof d.A)return he(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(fe(e,t))})),r}return ye(e,t)}!function(e){e[e.OBJECT=0]="OBJECT",e[e.ENTITY=1]="ENTITY",e[e.RELATIONSHIP=2]="RELATIONSHIP",e[e.PATH=3]="PATH",e[e.ARRAY=4]="ARRAY"}(ie||(ie={})),function(e){e[e.view=0]="view",e[e.edit=1]="edit"}(oe||(oe={})),function(e){e[e.exclude=0]="exclude",e[e.include=1]="include"}(se||(se={}));var me,ge,_e,we,ve=r(35448);function Te(e,t){if(!e.typeName)throw new s.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(!("originId"in e)){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,i]of Object.entries(e.properties))r.set_key_value(n,Me(i,t));return e.id&&r.set_id(e.id),r}if("originId"in e&&"destinationId"in e){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,i]of Object.entries(e.properties))r.set_key_value(n,Me(i,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new s.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function Ae(e,t){const r=new t.GraphProperty;return r.deleteLater(),r.name=e.name,r.alias=e.alias??"",r.field_type={value:ve.r5[e.fieldType]},r.geometry_type={value:e.geometryType?ve.bV[e.geometryType]:ve.bV.esriGeometryNull},r.has_m=e.hasM??!1,r.has_z=e.hasZ??!1,r.nullable=e.nullable??!1,r.editable=e.editable,r.required=e.required,r.default_visibility=e.defaultVisibility,r.system_maintained=e.systemMaintained??!1,r.role={value:ve.ti[e.role]},r.default_value=Me(e.defaultValue,t),r}function be(e,t,r){r.name=e.name,r.alias=e.alias??"",r.role={value:ve.Eq[e.role]},r.strict=e.strict;for(const n of e.properties){const e=Ae(n,t);r.add_property(e)}return r}function Me(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof d.A?he(e,t):null}function Se(e){const t=e.get_keys(),r=new Array;for(let e=0;e<t.get_keys_count();e++){const n=t.get_key_at(e);n.get_client_data_key_type().value===me.ClientDataKeyTypeString&&r.push(n.key_string)}return r}!function(e){e[e.ClientDataKeyTypeUNSPECIFIED=0]="ClientDataKeyTypeUNSPECIFIED",e[e.ClientDataKeyTypeString=1]="ClientDataKeyTypeString"}(me||(me={})),function(e){e[e.ClientDataTypeUNSPECIFIED=0]="ClientDataTypeUNSPECIFIED",e[e.ClientDataTypeString=1]="ClientDataTypeString"}(ge||(ge={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.ClientData=1]="ClientData",e[e.NotModified=2]="NotModified"}(_e||(_e={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.Error=1]="Error",e[e.ClientDataValue=2]="ClientDataValue"}(we||(we={}));let Re=class extends c.A{constructor(e){super(e),this.entityAddResultsCount=0,this.relationshipAddResultsCount=0,this.decoderError=null,this.entityAddResults=[],this.relationshipAddResults=[],this.updatedKnowledgeGraph=null}};(0,p._)([(0,y.MZ)()],Re.prototype,"entityAddResultsCount",void 0),(0,p._)([(0,y.MZ)()],Re.prototype,"relationshipAddResultsCount",void 0),(0,p._)([(0,y.MZ)()],Re.prototype,"decoderError",void 0),(0,p._)([(0,y.MZ)()],Re.prototype,"entityAddResults",void 0),(0,p._)([(0,y.MZ)()],Re.prototype,"relationshipAddResults",void 0),(0,p._)([(0,y.MZ)()],Re.prototype,"updatedKnowledgeGraph",void 0),Re=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphAddNamedTypesResult")],Re);let Pe=class extends c.A{constructor(e){super(e),this.decoderError=null,this.updatedKnowledgeGraph=null}};function Ge(e){const t=e.get_entity_type_add_results_count(),r=e.get_relationship_type_add_results_count(),n=new Re({decoderError:re(e.error),entityAddResultsCount:t,relationshipAddResultsCount:r});for(let r=0;r<t;r++){const t=e.get_entity_type_add_results_at(r),i=t.get_name(),o=t.get_error();n.entityAddResults.push({typeName:i,error:re(o)})}for(let t=0;t<r;t++){const r=e.get_relationship_type_add_results_at(t),i=r.get_name(),o=r.get_error();n.relationshipAddResults.push({typeName:i,error:re(o)})}return n}(0,p._)([(0,y.MZ)()],Pe.prototype,"decoderError",void 0),(0,p._)([(0,y.MZ)()],Pe.prototype,"updatedKnowledgeGraph",void 0),Pe=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphDeleteNamedTypeResult")],Pe);let Ee=class extends c.A{constructor(e){super(e),this.name=null,this.supportedCategory="esriTypeUNSPECIFIED",this.analyzers=[],this.searchProperties=new Map}};(0,p._)([(0,y.MZ)()],Ee.prototype,"name",void 0),(0,p._)([(0,y.MZ)()],Ee.prototype,"supportedCategory",void 0),(0,p._)([(0,y.MZ)()],Ee.prototype,"analyzers",void 0),(0,p._)([(0,y.MZ)()],Ee.prototype,"searchProperties",void 0),Ee=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.SearchIndex")],Ee);let Ne=!1;function ke(e){return e.deleteLater(),new Y(Ie(e))}function De(e){return e.deleteLater(),new $({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:Fe(e.fields)})}function Ie(e){return{name:e.name,alias:e.alias,role:ve.Eq[e.role.value],strict:e.strict,properties:Ze(e.properties),fieldIndexes:Ue(e.field_indexes)}}function xe(e){return e.deleteLater(),new B({alias:e.alias,name:e.name,fieldType:ve.r5[e.field_type.value]?ve.r5[e.field_type.value]:void 0,geometryType:ve.bV[e.geometry_type.value]?ve.bV[e.geometry_type.value]:null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:ve.ti[e.role.value],defaultValue:e.default_value})}function Oe(e){e.deleteLater();const t=Ie(e),r=[];for(let t=0;t<e.end_points.size();t++){const n=e.end_points.get(t);r.push({originEntityType:n.origin_entity_type,destinationEntityType:n.dest_entity_type})}return e.end_points.delete(),new H(Object.assign({endPoints:r},t))}function je(e){return new Q({behavior:e.behavior,value:e.value})}function Ce(e){const t=[];for(let r=0;r<e.size();r++)t.push(ke(e.get(r)));return e.delete(),t}function Fe(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function Ze(e){const t=[];for(let r=0;r<e.size();r++){const n=xe(e.get(r));"esriFieldTypeBigInteger"===n.fieldType&&(Ne=!0),t.push(n)}return e.delete(),t}function Ue(e){const t=[];for(let r=0;r<e.size();r++)t.push(De(e.get(r)));return e.delete(),t}function qe(e){const t=[];for(let r=0;r<e.size();r++)t.push(Oe(e.get(r)));return e.delete(),t}function Le(e){const t=[];for(let r=0;r<e.size();r++){const n=e.get(r);n.deleteLater(),t.push(je(n))}return e.delete(),t}function ze(e){const t=[];for(let r=0;r<e.size();r++){const r=new Ee,n=e.get(0);r.name=n.name,r.supportedCategory=ve.nP[n.supported_category.value];const i=n.analyzers.size();for(let e=0;e<i;e++)r.analyzers.push({name:n.analyzers.get(e).name});n.analyzers.delete();for(let e=0;e<n.search_properties.keys().size();e++){const t=n.search_properties.keys().get(e),i=n.search_properties.get(t),o=[];for(let e=0;e<i.property_names.size();e++)o.push(i.property_names.get(e));r.searchProperties.set(t,{propertyNames:o})}t.push(r)}return e.delete(),t}var Je,Ke=r(25927),$e=(r(77901),r(40662)),Be=r(42095),Ve=r(23150);function Ye(e,t){const r={paths:[],hasM:!1,hasZ:!1},n=He(e,r),{coords:i,geometry_type:o,lengths:a}=e;if(o.value!==t)throw new s.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");let l=0;return a.forEach((e=>{const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e[t]=i[l],l++;t.push(e)}r.paths.push(t)})),r}function He(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}!function(e){e[e.ESRI_GEOMETRY_NULL=0]="ESRI_GEOMETRY_NULL",e[e.ESRI_GEOMETRY_POINT=1]="ESRI_GEOMETRY_POINT",e[e.ESRI_GEOMETRY_MULTIPOINT=2]="ESRI_GEOMETRY_MULTIPOINT",e[e.ESRI_GEOMETRY_POLYLINE=3]="ESRI_GEOMETRY_POLYLINE",e[e.ESRI_GEOMETRY_POLYGON=4]="ESRI_GEOMETRY_POLYGON",e[e.ESRI_GEOMETRY_ENVELOPE=5]="ESRI_GEOMETRY_ENVELOPE",e[e.ESRI_GEOMETRY_ANY=6]="ESRI_GEOMETRY_ANY",e[e.ESRI_GEOMETRY_MULTI_PATCH=7]="ESRI_GEOMETRY_MULTI_PATCH"}(Je||(Je={}));const Qe=()=>a.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function We(e,t,r){return((e,t,r)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case Je.ESRI_GEOMETRY_POINT:return function(e,t){const r={spatialReference:t};let n=2;He(e,r);const i=e.coords;return r.x=i[0],r.y=i[1],e.has_z&&(r.z=i[n],n++),e.has_m&&(r.m=i[n]),new de.A(r)}(e,r);case Je.ESRI_GEOMETRY_MULTIPOINT:return function(e,t){const r={spatialReference:t},n=He(e,r),i=e.lengths,o=e.coords,s=i[0];r.points=[];let a=0;for(let e=0;e<s;e++){const e=[];for(let t=0;t<n;t++)e[t]=o[a],a++;r.points.push(e)}return new le.A(r)}(e,r);case Je.ESRI_GEOMETRY_POLYLINE:return function(e,t){const{paths:r,hasM:n,hasZ:i}=Ye(e,Je.ESRI_GEOMETRY_POLYLINE);return new pe.A({paths:r,hasM:n,hasZ:i,spatialReference:t})}(e,r);case Je.ESRI_GEOMETRY_POLYGON:return function(e,t){const{paths:r,hasM:n,hasZ:i}=Ye(e,Je.ESRI_GEOMETRY_POLYGON);return new ue.A({rings:r,hasM:n,hasZ:i,spatialReference:t})}(e,r);case Je.ESRI_GEOMETRY_ENVELOPE:case Je.ESRI_GEOMETRY_MULTI_PATCH:return Qe().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;case Je.ESRI_GEOMETRY_NULL:case Je.ESRI_GEOMETRY_ANY:default:return Qe().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return Qe().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case ie.OBJECT:return function(e,t,r){return new $e.A(et(e,t,r))}(e,t,r);case ie.ENTITY:return Xe(e,t,r);case ie.RELATIONSHIP:return tt(e,t,r);case ie.PATH:return function(e,t,r){const n=e.entity_count(),i=e.relationship_count(),o=[];for(let s=0;s<n;s++)o.push(Xe(e.get_entity_at(s),t,r)),s<i&&o.push(tt(e.get_relationship_at(s),t,r));return new Be.A({path:o})}(e,t,r);case ie.ARRAY:return function(e,t,r){const n=[],i=e.count();for(let o=0;o<i;o++){const i=e.get_value_at(o);n.push(We(i,t,r))}return n}(e,t,r);default:return Qe().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}})(e,t,r)}function Xe(e,t,r){const n=e.type_name,i=et(e,t,r),o=e.get_id();return new Ke.A(Object.assign({typeName:n,id:o},i))}function et(e,t,r){const n={},i=e.key_count();for(let o=0;o<i;o++)n[e.get_key_at(o)]=We(e.get_value_at(o),t,r);return{properties:n}}function tt(e,t,r){const n=e.type_name,i=et(e,t,r);return new Ve.A(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},i))}function rt(e){const t=[];for(let r=0;r<e.get_header_keys().size();r++)t.push(e.get_header_keys().get(r));const r=new u.A(e.get_out_sr());return new z({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit()})}let nt=class extends c.A{constructor(e){super(e),this.hasError=!1,this.error=null,this.editResults=[]}};(0,p._)([(0,y.MZ)()],nt.prototype,"hasError",void 0),(0,p._)([(0,y.MZ)()],nt.prototype,"error",void 0),(0,p._)([(0,y.MZ)()],nt.prototype,"editResults",void 0),nt=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],nt);const it=new Map,ot=()=>new Map(it.entries()),st={fetchKnowledgeGraph:async e=>{const t=new ee({url:e}),r=[];return r.push(gt(t)),r.push(_t(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await It(e)},refreshServiceDefinition:async e=>{const t=(await(0,o.A)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new X(t),e.serviceDefinition},executeFindPathsAsynchronous:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new s.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /reset/services/");const n=r[0];return await Mt(`${n}/rest/services/System/KnowledgeGraphServerToolsAsync/GPServer/ServerFilteredFindPaths`,{in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:e.config.toJSON(),result_type:"STRING"},{},t)},executeFindPaths:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new s.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /reset/services/");const n=r[0],i=await St(`${n}/rest/services/System/KnowledgeGraphServerTools/GPServer/ServerFilteredFindPaths/execute`,{method:"post",query:{f:"pjson",in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:JSON.stringify(e.config),result_type:"STRING"},...t});if(i.data.results.length<1)throw new s.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results returned",i);let o;for(const e of i.data.results)if("out_results_string"===e.paramName){o=e.value;break}if(!o)throw new s.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results were returned on the expected paramater out_results_string",i);return o},fetchAsynchronousFindPathsResultData:async(e,t)=>(await e.fetchResultData("out_results_string",null,t)).value,executeQueryStreaming:async(e,t,r)=>{const n=`${e.url}/graph/query`;await Rt(e);const i=await Gt(n,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new s.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");i.data.body=await async function(e,t){const r=await(0,ae.I)(),n=new r.GraphQueryRequestEncoder;if(n.deleteLater(),e.outputSpatialReference?n.output_spatial_reference={wkid:e.outputSpatialReference.wkid,latestWkid:e.outputSpatialReference.latestWkid,vcsWkid:e.outputSpatialReference.vcsWkid,latestVcsWkid:e.outputSpatialReference.latestVcsWkid,wkt:e.outputSpatialReference.wkt??""}:n.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),n.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,i]of Object.entries(e.bindParameters))Pt(t,i,n,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,n);else{if(t.dataModel||await gt(t),4326!==t.dataModel?.spatialReference?.wkid)throw new s.A("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");n.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new s.A("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new s.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new s.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,n,r),e.provenanceBehavior&&function(e,t){t.provenance_behavior={value:se[e]}}(e.provenanceBehavior,n);try{n.encode()}catch(e){throw new s.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const i=n.get_encoding_result();if(0!==i.error.error_code)throw new s.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:i.error.error_code,errorMessage:i.error.error_message});return structuredClone(i.get_byte_buffer())}(t,e);const o=await bt(i.data.url,i.data);if(e.dataModel){const t=await Dt(o,e.dataModel);return new K({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new s.A("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const n=`${e.url}/graph/applyEdits`;await Rt(e);const i=await Gt(n,r);return i.data.body=await async function(e,t){if(t.dataModel||await gt(t),!t.dataModel)throw new s.A("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await(0,ae.I)(),n=!!e.options?.cascadeDelete,i=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());i.deleteLater(),i.cascade_delete=n;try{let t;e.entityAdds?.forEach((e=>{t=i.add_entity(Te(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipAdds?.forEach((e=>{if(!e.originId||!e.destinationId)throw new s.A("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=i.add_relationship(Te(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityUpdates?.forEach((e=>{if(!e.id)throw new s.A("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_entity(Te(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipUpdates?.forEach((e=>{if(!e.id)throw new s.A("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_relationship(Te(e,r)),te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityDeletes?.forEach((e=>{if(!e.typeName)throw new s.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach((e=>{t.delete_by_id(e)}))})),e.relationshipDeletes?.forEach((e=>{if(!e.typeName)throw new s.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!1);e.ids?.forEach((e=>{t.delete_by_id(e)}))})),i.encode()}catch(e){throw new s.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const o=i.get_encoding_result();return te(o.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(o.get_byte_buffer())}(t,e),async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await(0,ae.I)()).GraphApplyEditsDecoder);return r.deleteLater(),r.decode(new Uint8Array(t)),function(e){const t=e.has_error(),r=new nt({hasError:t,error:t?re(e.error):null}),n=e.get_edit_results_count();for(let t=0;t<n;t++){const n=e.get_edit_results_at(t),i=e.get_edit_results_type_name_at(t),o=[],s=[],a=[],l=n.get_add_results_count(),d=n.get_update_results_count(),u=n.get_delete_results_count();for(let e=0;e<l;e++){const t=n.get_add_result_at(e);o.push({id:t.id,error:re(t.error)})}for(let e=0;e<d;e++){const t=n.get_update_result_at(e);s.push({id:t.id,error:re(t.error)})}for(let e=0;e<u;e++){const t=n.get_delete_result_at(e);a.push({id:t.id,error:re(t.error)})}r.editResults.push({typeName:i,adds:o,updates:s,deletes:a})}return r}(r)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(await bt(i.data.url,i.data))},executeAddNamedTypes:async(e,t,r)=>{if(!t.newEntityTypes?.length&&!t.newRelationshipTypes?.length)throw new s.A("knowledge-graph:no-arguments","The operation to add types to the data model contained no values");const n=`${e.url}/dataModel/edit/namedTypes/add`;await Rt(e);const i=await Gt(n,r);i.data.body=await async function(e){const t=await(0,ae.I)(),r=new t.GraphNamedObjectTypeAddsRequestEncoder;r.deleteLater(),e.newEntityTypes?.forEach((e=>{r.add_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),be(e,t,r)}(e,t))})),e.newRelationshipTypes?.forEach((e=>{r.add_relationship_type(function(e,t){const r=new t.RelationshipType;r.deleteLater();for(const n of e.endPoints){const e=new t.EndPoint;e.deleteLater(),e.origin_entity_type=n.originEntityType,e.dest_entity_type=n.destinationEntityType,r.add_end_point(e)}return be(e,t,r)}(e,t))}));try{r.encode()}catch(e){throw new s.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const n=r.get_encoding_result();return te(n.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(n.get_byte_buffer())}(t);const o=await bt(i.data.url,i.data),a=await async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await(0,ae.I)()).GraphNamedObjectTypeAddsResponseDecoder);return r.deleteLater(),r.decode(new Uint8Array(t)),Ge(r)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(o);return a.updatedKnowledgeGraph=await mt(e.url),a},executeDeleteNamedType:async(e,t,r)=>{if(!t)throw new s.A("knowledge-graph:no-arguments","The operation to delete a named type from the data model contained no value");const n=`${e.url}/dataModel/edit/namedTypes/${t}/delete`;await Rt(e);const i=await Gt(n,r);i.data.body="";const o=await bt(i.data.url,i.data),a=await async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await(0,ae.I)()).GraphNamedObjectTypeDeleteResponseDecoder);return r.deleteLater(),r.decode(new Uint8Array(t)),function(e){return new Pe({decoderError:re(e.error)})}(r)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(o);return a.updatedKnowledgeGraph=await mt(e.url),a},executeQuery:async(e,t,r)=>{const n=`${e.url}/graph/query`,i=await(0,o.A)(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),a=i.getHeader?.("content-type"),l=i.data;if(a?.includes("application/x-protobuf")){const t=new((await(0,ae.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=kt({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new J({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:i.data})},executeSearch:async(e,t,r)=>{const n=t.typeCategoryFilter,i=`${e.url}/graph/search`,a=await(0,o.A)(i,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:n,...r?.query},signal:r?.signal,timeout:r?.timeout}),l=a.getHeader?.("content-type"),d=a.data;if(l?.includes("application/x-protobuf")){const t=new((await(0,ae.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=kt({wasmQueryDecoder:t,newArrayBufferToParse:d,dataModel:e.dataModel});return new J({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:l,data:a.data})},executeSearchStreaming:async(e,t,r)=>{const n=`${e.url}/graph/search`;await Rt(e);const i=await Gt(n,r);i.data.body=await async function(e){const t=await(0,ae.I)(),r=new t.GraphSearchRequestEncoder;if(r.deleteLater(),r.search_query=e.searchQuery,r.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(ce(e.idsFilter,t))}catch(e){throw new s.A("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach((e=>{r.add_named_type_filter(e)}));try{r.encode()}catch(e){throw new s.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const n=r.get_encoding_result();if(0!==n.error.error_code)throw new s.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return structuredClone(n.get_byte_buffer())}(t);const o=await bt(i.data.url,i.data);if(e.dataModel){const t=await Dt(o,e.dataModel);return new K({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},fetchClientDataAtKeys:async(e,t,r={ignoreCache:!1})=>{if(!t.length)return new Map;let n=it.get(e.url||"");n||(n=new Map,it.set(e.url||"",n));const i=new Map(n.entries()),o=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));const a=await(0,ae.I)(),l=function(e,t,r,n=!1){const i=new r.ClientDataFetchRequestEncoder;i.deleteLater();for(const o of e){const e=ne(o,t,r,n);i.add_client_data_fetch_request_parameter(e)}i.encode();const o=i.get_encoding_result();return te(o.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(o.get_byte_buffer())}(t,n,a,r.ignoreCache),d=await Gt(o,r.requestOptions);d.data.body=l;const u=await bt(d.data.url,d.data),p=u.headers.get("content-type");if(p?.includes("application/x-protobuf")){const e=new a.ClientDataFetchResponseDecoder;e.deleteLater();const t=await u.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&te(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,n=!1){const i=new Map;for(let o=0;o<e.get_results_count();o++){const s=e.get_result_at(o);if(s.get_fetch_result_case().value!==we.ClientDataValue||0!==s.error().error_code){const e=s.get_key().key_string;r.has(e)&&t.delete(e);continue}const a=s.get_value(),l=s.get_key().key_string,d=r.get(l);let u;if(a.get_data_case().value===_e.NotModified&&d)u=d.value;else{if(a.get_data_case().value!==_e.ClientData)continue;{u=a.get_data().client_data_string;const e=s.get_value().get_v_tag().v_tag;n||t.set(l,{key:l,version:e,value:u})}}i.set(l,u)}return i}(e,n,i,r.ignoreCache)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:p,data:u})},fetchAllClientDataKeys:async(e,t)=>{const r=`${e.url}/clientData`,n=await(0,o.A)(r,{responseType:"array-buffer",query:{f:"pbf"},signal:t?.signal,timeout:t?.timeout}),i=n.getHeader?.("content-type"),a=n.data;if(i?.includes("application/x-protobuf")){const e=new((await(0,ae.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(a)),e.has_error()&&te(e.error,"knowledge-graph:fetchAllClientDataKeys-decoding-error","An error occurred while decoding the client data keys response"),Se(e)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:i,data:n.data})},clearClientDataCache:()=>it.clear(),_fetchWrapper:async(e,t)=>fetch(e,t),_submitJobWrapper:async(e,t,r,n)=>async function(e,t,r,n){return r=g.from(r||{}),async function(e,t,r,n,i){const s={},a={},l=[];return function(e,t,r){for(const n in e){const i=e[n];if(i&&"object"==typeof i&&i instanceof P.A){const{features:e}=i;r[n]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}}}(n,l,s),(0,_.el)(l).then((l=>{const{outSpatialReference:d,processExtent:u,processSpatialReference:p,returnColumnName:c,returnFeatureCollection:y,returnM:h,returnZ:f}=r,{path:m}=(0,A.Dl)(e);for(const e in s){const[t,r]=s[e];a[e]=l.slice(t,r)}const g=d?d.wkid||d:null,_=p?p.wkid||p:null,w="execute"===t?{returnColumnName:c||void 0,returnFeatureCollection:y||void 0,returnM:h||void 0,returnZ:f||void 0}:null,v=C({...u?{context:{extent:u,outSR:g,processSR:_}}:{"env:outSR":g,"env:processSR":_},...n,...w,f:"json"},null,a),T={...i,query:v};return(0,o.A)(`${m}/${t}`,T)}))}(e,"submitJob",r,t??{},n).then((({data:t})=>{const r=L.fromJSON(t);return r.sourceUrl=e,r}))}(e,t,r,n),_esriRequestWrapper:async(e,t)=>(0,o.A)(e,t)};async function at(e,t,r){return st.executeApplyEdits(e,t,r)}async function lt(e,t,r){return st.executeAddNamedTypes(e,t,r)}async function dt(e,t,r){return st.executeDeleteNamedType(e,t,r)}async function ut(e,t,r){return st.executeQuery(e,t,r)}async function pt(e,t,r){return st.executeQueryStreaming(e,t,r)}async function ct(e,t,r){return st.executeSearch(e,t,r)}async function yt(e,t,r){return st.executeSearchStreaming(e,t,r)}function ht(e,t){return st.fetchAllClientDataKeys(e,t)}function ft(e,t,r){return st.fetchClientDataAtKeys(e,t,r)}async function mt(e){return st.fetchKnowledgeGraph(e)}async function gt(e){return st.refreshDataModel(e)}async function _t(e){return st.refreshServiceDefinition(e)}async function wt(e,t){return st.executeFindPathsAsynchronous(e,t)}async function vt(e,t){return st.executeFindPaths(e,t)}async function Tt(e,t){return st.fetchAsynchronousFindPathsResultData(e,t)}function At(){return st.clearClientDataCache()}async function bt(e,t){return st._fetchWrapper(e,t)}async function Mt(e,t,r,n){return st._submitJobWrapper(e,t,r,n)}async function St(e,t){return st._esriRequestWrapper(e,t)}async function Rt(e){const t=i.id?.findCredential(e.url);t||(e.dataModel?await It(e):await gt(e))}function Pt(e,t,r,n){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof d.A?r.set_param_key_value(e,he(t,n)):Array.isArray(t)?r.set_param_key_value(e,ce(t,n)):r.set_param_key_value(e,ye(t,n))}async function Gt(e,t){return(0,o.A)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}let Et=50;function Nt(e){Et=e}function kt({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:n,limitMaxProcessingTime:i=!1}){t&&e.push_buffer(new Uint8Array(t));const o=[];let a,l,d=0;const p=Date.now();let c=!0;for(;e.next_row();){a&&l||(a=n??rt(e),l=a.outSpatialReference??new u.A({wkid:4326})),d||(d=e.get_header_keys().size());const t=new Array(d);for(let n=0;n<d;n++){const i=e.get_value(n);t[n]=We(i,r,l)}if(o.push(t),i&&Date.now()-p>Et){c=!1;break}}if(e.has_error())throw new s.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - inner row decoding",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return{resultHeader:a,resultRows:o,parsedAllResultsFromBuffer:c}}async function Dt(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),n=new((await(0,ae.I)()).GraphQueryDecoder);let i,o,d;n.deleteLater();const u=new Promise(((e,t)=>{o=e,d=t}));let p=!1,c=null;const y=new ReadableStream({pull:async function e(u){if(!r){const e=new s.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw d(e),e}const{done:y,value:h}=c?{done:!1,value:null}:await r.read().catch((e=>{throw d(e),r.releaseLock(),e}));h&&(c=h);try{if(y){let e;if(n.has_error()?e=new s.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - query stream done",{errorCode:n.error.error_code,errorMessage:n.error.error_message}):p||o(new z),r.releaseLock(),e)throw u.error(e),d(e),e;return void u.close()}const{resultHeader:a,resultRows:l,parsedAllResultsFromBuffer:f}=kt({wasmQueryDecoder:n,newArrayBufferToParse:h,dataModel:t,decodedHeader:i,limitMaxProcessingTime:!0});return f&&(c=null),!i&&a&&(i=a,o(a),p=!0),l.length>0?void u.enqueue(l):await e(u)}catch(e){throw a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),d(e),r.releaseLock(),(0,l.zf)(e)?e:new s.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}});return{readableStream:y,resultHeader:await u}}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function It(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,o.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),i=r.data;if(n?.includes("application/x-protobuf")){const e=(await(0,ae.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(i));if(!e)throw new s.A("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){e.deleteLater(),Ne=!1;const t=new W({timestamp:e.timestamp,spatialReference:new u.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:ve.vy[e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value],databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:ve.wr[e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value]}},searchIndexes:ze(e.search_indexes),entityTypes:Ce(e.entity_types),relationshipTypes:qe(e.relationship_types),metaEntityTypes:Ce(e.meta_entity_types),provenanceSourceTypeValues:Le(e.provenance_source_type_values.value_behavior_array)});return Ne&&a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("A big integer field was detected in the retrieved data model. The `big-integer` field type is not fully supported in web clients. Please see https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#type"),t}(e)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[655],{16405:(t,e,r)=>{r.d(e,{A:()=>c});var s,o=r(90237),i=r(69622),l=r(66552),a=r(4718),n=r(10107),u=(r(44208),r(53966),r(40608)),p=r(5443),d=r(16930),h=r(28735);const y=new l.J({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let c=s=class extends i.A{constructor(t){super(t),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(t){"asc"!==t&&"desc"!==t||this._set("sortOrder",t)}clone(){return new s({categories:this.categories?(0,a.o8)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(t,e){let r=[];this.categories&&(r=this.categories.map((t=>Array.isArray(t)?JSON.stringify(t):t)));let s="";if(this.extent){const t=(0,h.Cv)(this.extent,d.A.WGS84);null!=t&&(s=`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`)}let o=this.query;!this.disableExtraQuery&&t.extraQuery&&(o="("+o+")"+t.extraQuery);const i={categories:r,bbox:s,q:o,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(i.sortField=this.sortField.split(",").map((t=>y.toJSON(t.trim()))).join(","),i.sortOrder=this.sortOrder),{query:{...e,...i}}}};(0,o._)([(0,n.MZ)()],c.prototype,"categories",void 0),(0,o._)([(0,n.MZ)()],c.prototype,"disableExtraQuery",void 0),(0,o._)([(0,n.MZ)({type:p.A})],c.prototype,"extent",void 0),(0,o._)([(0,n.MZ)()],c.prototype,"filter",void 0),(0,o._)([(0,n.MZ)()],c.prototype,"num",void 0),(0,o._)([(0,n.MZ)()],c.prototype,"query",void 0),(0,o._)([(0,n.MZ)()],c.prototype,"sortField",void 0),(0,o._)([(0,n.MZ)()],c.prototype,"sortOrder",null),(0,o._)([(0,n.MZ)()],c.prototype,"start",void 0),c=s=(0,o._)([(0,u.$)("esri.portal.PortalQueryParams")],c)},20655:(t,e,r)=>{r.d(e,{A:()=>b});var s=r(90237),o=r(92602),i=r(70333),l=r(78888),a=r(49186),n=r(25482),u=r(92474),p=r(97768),d=r(74887),h=r(10107),y=r(56507),c=(r(44208),r(87811),r(36005)),m=r(40608),_=r(5443),v=r(73444);let f;var M=r(96360),g=r(16405),Z=r(69622);r(53966);let S=class extends Z.A{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,s._)([(0,h.MZ)()],S.prototype,"nextQueryParams",void 0),(0,s._)([(0,h.MZ)()],S.prototype,"queryParams",void 0),(0,s._)([(0,h.MZ)()],S.prototype,"results",void 0),(0,s._)([(0,h.MZ)()],S.prototype,"total",void 0),S=(0,s._)([(0,m.$)("esri.portal.PortalQueryResult")],S);var P,O=r(41318),w=r(926);let A;const C={PortalGroup:()=>Promise.resolve({default:M.A}),PortalItem:()=>r.e(812).then(r.bind(r,80812)),PortalUser:()=>Promise.resolve({default:O.A})};let b=class extends(n.A.JSONSupportMixin(u.A)){static{P=this}static{this.AUTH_MODE_ANONYMOUS="anonymous"}static{this.AUTH_MODE_AUTO="auto"}static{this.AUTH_MODE_IMMEDIATE="immediate"}static{this.AUTH_MODE_NO_PROMPT="no-prompt"}constructor(t){super(t),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.default3DBasemapQuery=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.layoutGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.hasClassificationSchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.recycleBinEnabled=!1,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=o.A.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useDefault3dBasemap=!1,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(t){return"string"==typeof t?{url:t}:t}destroy(){D.unregister(this),this.defaultBasemap=(0,p.pR)(this.defaultBasemap),this.defaultDevBasemap=(0,p.pR)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,p.pR)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,p.xt)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)o.A.request.trustedServers.includes(e)||o.A.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){const t=this.user?.orgId,e=!t||this.canSearchPublic;return this.id&&!e?` AND orgid:${this.id}`:null}get hasAPIKey(){return(0,w.Jn)(this.url)}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get restUrl(){let t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.slice(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t?t.toLowerCase():t}readUser(t){let e=null;return t&&(e=O.A.fromJSON(t),e.portal=this),e}load(t){const e=Promise.all([r.e(812),r.e(3116)]).then(r.bind(r,83116)).then((({default:e})=>{(0,d.Te)(t),A=e})).then((()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,t))).then((t=>{if(!this.hasAPIKey&&i.id){const t=i.id;this.credential=t.findCredential(this.restUrl),this.credential||this.authMode!==P.AUTH_MODE_AUTO&&this.authMode!==P.AUTH_MODE_NO_PROMPT||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=t.on("credential-create",function(t){const e=i.id;return()=>{const r=t.deref();r&&e.findCredential(r.restUrl)&&r.signIn().catch((()=>{}))}}(new WeakRef(this))),D.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=t,this.read(t)}));return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await Promise.all([r.e(6131),r.e(9953),r.e(586),r.e(812),r.e(9186),r.e(5751)]).then(r.bind(r,68611))).default;return t?t.map((t=>new e({id:t.id,url:t.url}))):[]}async fetchBasemaps(t,e){const r=await this._fetchBasemaps(t,e);if(!0===e?.include3d&&!1!==this.use3dBasemaps){const s=await this._fetchBasemaps3D(t,e);r.unshift(...s)}return r}async fetchDefault3DBasemap(t){if(!this.useDefault3dBasemap||!this.default3DBasemapQuery||"none"===this.default3DBasemapQuery)return null;const e=new g.A;e.query=this.default3DBasemapQuery,e.disableExtraQuery=!0;const r=(await this.queryItems(e,t)).results.find((t=>"Web Scene"===t.type));return r?new A({portalItem:r}):null}fetchCategorySchema(t){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",t).then((t=>t.categorySchema)):(0,d.G4)(t)?Promise.reject((0,d.NK)()):Promise.resolve([])}async fetchClassificationSchema(t){return this.hasClassificationSchema?this.request(this.restUrl+"/portals/self/classification/classificationSchema",t).then((t=>t.classificationSchema)):null}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new g.A({num:100,sortField:"title"});if(e?.length){const s=[];for(const t of e)s.push(`(title:"${t.title}" AND owner:${t.owner})`);return r.query=s.join(" OR "),this.queryGroups(r,t).then((t=>t.results))}return(0,d.G4)(t)?Promise.reject((0,d.NK)()):Promise.resolve([])}fetchRegions(t){const e=this.user?.culture||this.culture||(0,v.JK)();return this.request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){const e=this.user?.culture||this.culture||(0,v.JK)();return this.request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return f&&!f.destroyed||(f=new P),f}queryGroups(t,e){return this.queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this.queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this.queryPortal("/community/users",t,"PortalUser",e)}fetchSelf(t=this.authMode,e=!1,r){const s=this.restUrl+"/portals/self",o={authMode:t,query:{culture:(0,v.JK)().toLowerCase()},withCredentials:!0,...r};return"auto"===o.authMode&&(o.authMode="no-prompt"),e&&(o.query.default=!0),this.request(s,o)}queryPortal(t,e,r,s){const o=(0,y.dp)(g.A,e),i=e=>this.request(this.restUrl+t,{...o.toRequestOptions(this),...s}).then((t=>{const r=o.clone();return r.start=t.nextStart,new S({nextQueryParams:r,queryParams:o,total:t.total,results:P._resultsToTypedArray(e,{portal:this},t,s)})})).then((t=>Promise.all(t.results.map((e=>"function"==typeof e.when?e.when():t))).then((()=>t),(e=>((0,d.QP)(e),t)))));return r&&C[r]?C[r]().then((({default:t})=>((0,d.Te)(s),i(t)))):i()}signIn(){if(this.hasAPIKey)return this.load().then((()=>{if(!this.user)throw new a.A("portal:not-authenticated","Unable to authenticate user. Portal.user is missing")}));if(this.authMode===P.AUTH_MODE_ANONYMOUS||this.authMode===P.AUTH_MODE_NO_PROMPT&&!i.id)return Promise.reject(new a.A("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const t=t=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(t||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=t,this.fetchSelf("immediate")))):this.user&&this.credential===t?null:(this.credential=t,this.fetchSelf("immediate")))).then((t=>{t&&(this.sourceJSON=t,this.read(t))}));return i.id?i.id.getCredential(this.restUrl,{prompt:this.authMode!==P.AUTH_MODE_NO_PROMPT}).then((e=>t(e))):t(this.credential)}normalizeUrl(t){const e=this.credential?.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}requestToTypedArray(t,e,r){return this.request(t,e).then((t=>{const e=P._resultsToTypedArray(r,{portal:this},t);return Promise.all(e.map((e=>"function"==typeof e.when?e.when():t))).then((()=>e),(()=>e))}))}request(t,e={}){const r={f:"json",...e.query},{authMode:s=(this.authMode===P.AUTH_MODE_ANONYMOUS||this.authMode===P.AUTH_MODE_NO_PROMPT?this.authMode:"auto"),body:o=null,cacheBust:i=!1,method:a="auto",responseType:n="json",signal:u}=e,p={authMode:s,body:o,cacheBust:i,method:a,query:r,responseType:n,timeout:0,signal:u};return e.withCredentials&&(p.withCredentials=!0),(0,l.A)(this._normalizeSSL(t),p).then((t=>t.data))}toJSON(){throw new a.A("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new P({sourceJSON:t})}_getHelperService(t){const e=this.helperServices&&this.helperServices[t];if(!e)throw new a.A("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}async _fetchBasemaps(t,e){const r=new g.A;r.query=t||(this.hasAPIKey?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const s=await this.queryGroups(r,e);if(!s.total)return[];const o=s.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=o.sortField||"name",r.sortOrder=o.sortOrder||"desc";const i=await o.queryItems(r,e);return i.total?i.results.filter((t=>"Web Map"===t.type)).map((t=>new A({portalItem:t}))):[]}async _fetchBasemaps3D(t,e){const r=t||this.basemapGalleryGroupQuery3D;if(!r)return[];if(this.hasAPIKey)return[];const s=new g.A({query:r,disableExtraQuery:!0}),o=await this.queryGroups(s,e);if(!o.total)return[];const i=o.results[0];s.num=100,s.query='type:"Web Scene"',s.sortField=i.sortField||"name",s.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(s,e);return l.total?l.results.filter((t=>"Web Scene"===t.type)).map((t=>new A({portalItem:t}))):[]}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(t){if(t){const e=A.fromJSON(t);return e.portalItem={portal:this},e}return null}static _resultsToTypedArray(t,e,r,s){let o;if(r){const i=null!=s?s.signal:null;o=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(o=o.map((r=>{const s=Object.assign(t?t.fromJSON(r):r,e);return"function"==typeof s.load&&s.load(i),s})))}else o=[];return o}};(0,s._)([(0,h.MZ)()],b.prototype,"access",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"allSSL",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"authMode",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"authorizedCrossOriginDomains",void 0),(0,s._)([(0,c.w)("authorizedCrossOriginDomains")],b.prototype,"readAuthorizedCrossOriginDomains",null),(0,s._)([(0,h.MZ)()],b.prototype,"basemapGalleryGroupQuery",void 0),(0,s._)([(0,h.MZ)({json:{name:"3DBasemapGalleryGroupQuery"}})],b.prototype,"basemapGalleryGroupQuery3D",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"bingKey",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"canListApps",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"canListData",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"canListPreProvisionedItems",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"canProvisionDirectPurchase",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"canSearchPublic",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"canShareBingPublic",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"canSharePublic",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"canSignInArcGIS",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"canSignInIDP",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"colorSetsGroupQuery",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"commentsEnabled",void 0),(0,s._)([(0,h.MZ)({type:Date})],b.prototype,"created",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"credential",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"culture",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"currentVersion",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"customBaseUrl",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"default3DBasemapQuery",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"defaultBasemap",void 0),(0,s._)([(0,c.w)("defaultBasemap")],b.prototype,"readDefaultBasemap",null),(0,s._)([(0,h.MZ)()],b.prototype,"defaultDevBasemap",void 0),(0,s._)([(0,c.w)("defaultDevBasemap")],b.prototype,"readDefaultDevBasemap",null),(0,s._)([(0,h.MZ)({type:_.A})],b.prototype,"defaultExtent",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"defaultVectorBasemap",void 0),(0,s._)([(0,c.w)("defaultVectorBasemap")],b.prototype,"readDefaultVectorBasemap",null),(0,s._)([(0,h.MZ)()],b.prototype,"description",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"devBasemapGalleryGroupQuery",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"eueiEnabled",void 0),(0,s._)([(0,h.MZ)({readOnly:!0})],b.prototype,"extraQuery",null),(0,s._)([(0,h.MZ)()],b.prototype,"featuredGroups",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"featuredItemsGroupQuery",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"galleryTemplatesGroupQuery",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"layoutGroupQuery",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"livingAtlasGroupQuery",void 0),(0,s._)([(0,h.MZ)({readOnly:!0})],b.prototype,"hasAPIKey",null),(0,s._)([(0,h.MZ)()],b.prototype,"hasCategorySchema",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"hasClassificationSchema",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"helpBase",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"helperServices",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"helpMap",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"homePageFeaturedContent",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"homePageFeaturedContentCount",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"httpPort",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"httpsPort",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"id",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"ipCntryCode",void 0),(0,s._)([(0,h.MZ)({readOnly:!0})],b.prototype,"isOrganization",null),(0,s._)([(0,h.MZ)()],b.prototype,"isPortal",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"isReadOnly",void 0),(0,s._)([(0,h.MZ)({readOnly:!0})],b.prototype,"itemPageUrl",null),(0,s._)([(0,h.MZ)()],b.prototype,"layerTemplatesGroupQuery",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"maxTokenExpirationMinutes",void 0),(0,s._)([(0,h.MZ)({type:Date})],b.prototype,"modified",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"name",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"portalHostname",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"portalMode",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"portalProperties",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"region",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"recycleBinEnabled",void 0),(0,s._)([(0,h.MZ)({readOnly:!0})],b.prototype,"restUrl",null),(0,s._)([(0,h.MZ)()],b.prototype,"rotatorPanels",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"showHomePageDescription",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"sourceJSON",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"staticImagesUrl",void 0),(0,s._)([(0,h.MZ)({json:{name:"2DStylesGroupQuery"}})],b.prototype,"stylesGroupQuery2d",void 0),(0,s._)([(0,h.MZ)({json:{name:"stylesGroupQuery"}})],b.prototype,"stylesGroupQuery3d",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"supportsHostedServices",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"symbolSetsGroupQuery",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"templatesGroupQuery",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"thumbnail",void 0),(0,s._)([(0,h.MZ)({readOnly:!0})],b.prototype,"thumbnailUrl",null),(0,s._)([(0,h.MZ)()],b.prototype,"units",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"url",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"urlKey",void 0),(0,s._)([(0,c.w)("urlKey")],b.prototype,"readUrlKey",null),(0,s._)([(0,h.MZ)()],b.prototype,"user",void 0),(0,s._)([(0,c.w)("user")],b.prototype,"readUser",null),(0,s._)([(0,h.MZ)()],b.prototype,"use3dBasemaps",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"useDefault3dBasemap",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"useStandardizedQuery",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"useVectorBasemaps",void 0),(0,s._)([(0,h.MZ)()],b.prototype,"vectorBasemapGalleryGroupQuery",void 0),b=P=(0,s._)([(0,m.$)("esri.portal.Portal")],b);const D=new FinalizationRegistry((t=>{t.remove()}))},41318:(t,e,r)=>{r.d(e,{A:()=>d});var s=r(90237),o=r(49186),i=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let n=class extends i.A{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const t=this.portal?.restUrl;return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new o.A("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,s._)([(0,l.MZ)({type:Date})],n.prototype,"created",void 0),(0,s._)([(0,l.MZ)()],n.prototype,"id",void 0),(0,s._)([(0,l.MZ)()],n.prototype,"portal",void 0),(0,s._)([(0,l.MZ)()],n.prototype,"title",void 0),(0,s._)([(0,l.MZ)({readOnly:!0})],n.prototype,"url",null),(0,s._)([(0,l.MZ)()],n.prototype,"username",void 0),n=(0,s._)([(0,a.$)("esri.portal.PortalFolder")],n);var u,p=r(96360);let d=u=class extends i.A{constructor(t){super(t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.id=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userLicenseTypeId=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.portal?.restUrl;return t?`${t}/content/users/${this.id}`:null}get url(){const t=this.portal?.restUrl;return t?`${t}/community/users/${this.id}`:null}addItem(t){const e=t&&t.item,r=t?.data,s=t?.folder,o={method:"post"};e&&(o.query=e.createPostQuery(),null!=r&&("string"==typeof r?o.query.text=r:"object"==typeof r&&(o.query.text=JSON.stringify(r))));let i=this.userContentUrl;return s&&(i+="/"+("string"==typeof s?s:s.id)),this.portal.request(i+"/addItem",o).then((t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load())))}async deleteItem(t,e=!1){let r=this.userContentUrl;t.ownerFolder&&(r+="/"+t.ownerFolder);const s=e?{permanentDelete:!0}:{};await this.portal.request(r+`/items/${t.id}/delete`,{method:"post",query:s}),t.id=null,t.portal=null}async deleteItems(t,e=!1){t=t.slice();const r=this.userContentUrl+"/deleteItems",s=[],i=t.map((t=>t.id));if(i.length){const l={method:"post",query:{items:i.join(","),permanentDelete:e}},a=await this.portal.request(r,l);for(const e of a.results){const r=t.find((t=>e.itemId===t.id)),i=e.success;let l=null;i?(r.id=null,r.portal=null):e.error&&(l=new o.A("portal:delete-item-failed",e.error.message,e.error)),s.push({item:r,success:i,error:l})}}return s}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then((t=>{let e;return e=t&&t.folders?t.folders.map((t=>{const e=n.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchGroups(){return this.portal.request(this.url??"").then((t=>{let e;return e=t&&t.groups?t.groups.map((t=>{const e=p.A.fromJSON(t);return e.portal=this.portal,e})):[],e}))}async fetchItems(t){t??={};let e=this.userContentUrl??"";t.folder&&(e+="/"+t.folder.id);const{default:s}=await r.e(812).then(r.bind(r,80812)),o={folders:!1,inRecycleBin:!!t.inRecycleBin||null,foldersContent:!(t.folder||!t.includeSubfolderItems)||null,num:t.num||10,start:t.start||1,sortField:t.sortField||"created",sortOrder:t.sortOrder||"asc"},i=await this.portal.request(e,{query:o});let l;return i?.items?(l=i.items.map((t=>{const e=s.fromJSON(t);return e.portal=this.portal,e})),await Promise.all(l.map((t=>t.load()))),{items:l,nextStart:i.nextStart,total:i.total}):{items:[],nextStart:-1,total:0}}fetchTags(){return this.portal.request(this.url+"/tags").then((t=>t.tags))}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new p.A({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new o.A("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}async restoreItem(t,e){const r=this.userContentUrl,s=e?{folderID:"string"==typeof e?e:e.id}:null;await this.portal.request(r+`/items/${t.id}/restore`,{method:"post",query:s})}toJSON(){throw new o.A("internal:not-yet-implemented","PortalUser.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new u({sourceJSON:t});return e.read(t),e}};(0,s._)([(0,l.MZ)()],d.prototype,"access",void 0),(0,s._)([(0,l.MZ)({type:Date})],d.prototype,"created",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"culture",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"description",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"email",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"favGroupId",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"fullName",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"id",void 0),(0,s._)([(0,l.MZ)({type:Date})],d.prototype,"modified",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"orgId",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"portal",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"preferredView",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"privileges",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"region",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"role",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"roleId",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"sourceJSON",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"thumbnail",void 0),(0,s._)([(0,l.MZ)({readOnly:!0})],d.prototype,"thumbnailUrl",null),(0,s._)([(0,l.MZ)()],d.prototype,"units",void 0),(0,s._)([(0,l.MZ)({readOnly:!0})],d.prototype,"userContentUrl",null),(0,s._)([(0,l.MZ)({readOnly:!0})],d.prototype,"url",null),(0,s._)([(0,l.MZ)()],d.prototype,"username",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"userLicenseTypeId",void 0),(0,s._)([(0,l.MZ)()],d.prototype,"userType",void 0),d=u=(0,s._)([(0,a.$)("esri.portal.PortalUser")],d)},61893:(t,e,r)=>{r.d(e,{A:()=>d});var s,o,i=r(90237),l=r(69622),a=r(74887),n=r(40608);(o=s||(s={}))[o.PENDING=0]="PENDING",o[o.RESOLVED=1]="RESOLVED",o[o.REJECTED=2]="REJECTED";class u{constructor(){this._resolver=(0,a.Tw)(),this._status=s.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=s.RESOLVED,this._cleanUp()}),(()=>{this._status=s.REJECTED,this._cleanUp()})),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return this._status===s.RESOLVED}isRejected(){return this._status===s.REJECTED}isFulfilled(){return this._status!==s.PENDING}abort(){this._resolver.reject((0,a.NK)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const t=(0,a.Tw)(),e=[...this._resolvingPromises,t.promise],r=this._allPromise=Promise.all(e);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()}),(t=>{this.isFulfilled()||this._allPromise!==r||(0,a.zf)(t)||this._resolver.reject(t)})),t.resolve()}}const p=t=>{let e=class extends t{constructor(...t){super(...t),this._promiseProps=new u,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(t,e){return this._promiseProps.promise.then((()=>this)).then(t,e)}catch(t){return this.when(null,t)}addResolvingPromise(t){t&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in t?t.when():t)}};return e=(0,i._)([(0,n.$)("esri.core.Promise")],e),e};let d=class extends(p(l.A)){};d=(0,i._)([(0,n.$)("esri.core.Promise")],d),function(t){t.EsriPromiseMixin=p}(d||(d={}))},92474:(t,e,r)=>{r.d(e,{A:()=>y});var s=r(90237),o=r(49186),i=r(97768),l=r(61893),a=r(74887),n=r(67076),u=r(10107),p=r(40608);const d="loaded",h=t=>{let e=class extends t{constructor(...t){super(...t),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((t=>{const e=this.load.bind(this);this.load=r=>{const s=new Promise(((t,e)=>{const s=(0,a.NY)(r,e);this.destroyed&&e(new o.A("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(t,e).finally((()=>{s&&s.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const t=this._loadController=new AbortController;e({signal:t.signal})}return t(),s}}))),this.when((()=>{this._set("loadStatus",d),this._loadController=null}),(t=>{this._set("loadStatus","failed"),this._set("loadError",t),this._loadController=null}))}destroy(){this._loadController&&(this._loadController=(0,i.DC)(this._loadController),this._promiseProps.abort()),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===d}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new o.A("load:cancelled","Cancelled")),this._loadController?.abort(),this._promiseProps.abort()),this}};return(0,s._)([(0,u.MZ)({readOnly:!0})],e.prototype,"loaded",null),(0,s._)([(0,u.MZ)({readOnly:!0})],e.prototype,"loadError",void 0),(0,s._)([(0,u.MZ)({clonable:!1})],e.prototype,"loadStatus",void 0),(0,s._)([(0,u.MZ)({type:[n.A],readOnly:!0})],e.prototype,"loadWarnings",null),e=(0,s._)([(0,p.$)("esri.core.Loadable")],e),e};let y=class extends(h(l.A)){};var c;y=(0,s._)([(0,p.$)("esri.core.Loadable")],y),(c=y||(y={})).LoadableMixin=h,c.isLoadable=function(t){return!(!t||!t.load)}},96360:(t,e,r)=>{r.d(e,{A:()=>d});var s,o=r(90237),i=r(49186),l=r(25482),a=r(10107),n=r(56507),u=(r(44208),r(87811),r(40608)),p=r(16405);let d=s=class extends l.A{constructor(t){super(t),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.sourceJSON=null,this.tags=null,this.title=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e&&this.portal?this.portal?.normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){const t=this.portal?.restUrl;return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return this.portal.request(this.url+"/categorySchema",t).then((e=>{const r=e.categorySchema||[];return r.some((t=>"contentCategorySetsGroupQuery.LivingAtlas"===t.source))?this._fetchCategorySchemaSet("LivingAtlas",t):r}))}fetchMembers(t){return this.portal.request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new i.A("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new s({sourceJSON:t});return e.read(t),e}queryItems(t,e){let r=(0,n.dp)(p.A,t);const s=this.portal;return parseFloat(s.currentVersion)>5?(r=r||new p.A,s.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new p.A,r.query="group:"+this.id+(r.query?" "+r.query:""),s.queryItems(r,e))}_fetchCategorySchemaSet(t,e){const r=this.portal;return r.fetchSelf(r.authMode,!0,e).then((t=>{const s=t.contentCategorySetsGroupQuery;if(s){const t=new p.A({disableExtraQuery:!0,num:1,query:s});return r.queryGroups(t,e)}throw new i.A("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const s=r.results[0],o=new p.A({num:1,query:`typekeywords:"${t}"`});return s.queryItems(o,e)}throw new i.A("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((t=>t.total?t.results[0].fetchData("json",e).then((t=>{const e=t?.categorySchema;return e?.length?e:[]})):[]))}};(0,o._)([(0,a.MZ)()],d.prototype,"access",void 0),(0,o._)([(0,a.MZ)({type:Date})],d.prototype,"created",void 0),(0,o._)([(0,a.MZ)()],d.prototype,"description",void 0),(0,o._)([(0,a.MZ)()],d.prototype,"id",void 0),(0,o._)([(0,a.MZ)()],d.prototype,"isInvitationOnly",void 0),(0,o._)([(0,a.MZ)({type:Date})],d.prototype,"modified",void 0),(0,o._)([(0,a.MZ)()],d.prototype,"owner",void 0),(0,o._)([(0,a.MZ)()],d.prototype,"portal",void 0),(0,o._)([(0,a.MZ)()],d.prototype,"snippet",void 0),(0,o._)([(0,a.MZ)()],d.prototype,"sortField",void 0),(0,o._)([(0,a.MZ)()],d.prototype,"sortOrder",void 0),(0,o._)([(0,a.MZ)()],d.prototype,"sourceJSON",void 0),(0,o._)([(0,a.MZ)()],d.prototype,"tags",void 0),(0,o._)([(0,a.MZ)()],d.prototype,"thumbnail",void 0),(0,o._)([(0,a.MZ)({readOnly:!0})],d.prototype,"thumbnailUrl",null),(0,o._)([(0,a.MZ)()],d.prototype,"title",void 0),(0,o._)([(0,a.MZ)({readOnly:!0})],d.prototype,"url",null),d=s=(0,o._)([(0,u.$)("esri.portal.PortalGroup")],d)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2741],{926:(e,t,r)=>{r.d(t,{Jn:()=>i});var s=r(92602),n=r(84952);const o=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]);function a(e){const t=(0,n.$z)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!o.has(t)&&!e.endsWith("/sharing/rest/generateToken")}function i(e,t){return!(!t&&!s.A.apiKey||!a(e))}},2741:(e,t,r)=>{r.d(t,{s:()=>i});var s=r(92602),n=(r(78888),r(49186)),o=r(53966),a=r(84952);function i(e){if(!s.A.assetsPath)throw o.A.getLogger("esri.assets").errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new n.A("assets:path-not-set","config.assetsPath is not set");return(0,a.fj)(s.A.assetsPath,e)}},56058:(e,t,r)=>{r.d(t,{Sx:()=>i,c8:()=>d,m3:()=>h,ql:()=>u,tz:()=>p,xW:()=>f});var s=r(92602),n=r(44208),o=r(74887),a=r(84952);function i(e,t,r=!1,s){return new Promise(((a,i)=>{if((0,o.G4)(s))return void i(l());let c=()=>{p(),i(new Error(`Unable to load ${t}`))},u=()=>{const t=e;p(),a(t)},d=()=>{if(!e)return;const t=e;p(),t.src="",i(l())};const p=()=>{(0,n.A)("esri-image-decode")||(e.removeEventListener("error",c),e.removeEventListener("load",u)),c=null,u=null,e=null,null!=s&&s.removeEventListener("abort",d),d=null,r&&URL.revokeObjectURL(t)};null!=s&&s.addEventListener("abort",d),(0,n.A)("esri-image-decode")?e.decode().then(u,c):(e.addEventListener("error",c),e.addEventListener("load",u))}))}function l(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}const c="Timeout exceeded";function u(){return new Error(c)}function d(e){return"object"==typeof e&&!!e&&"message"in e&&e.message===c}function p(e){s.A.request.crossOriginNoCorsDomains||(s.A.request.crossOriginNoCorsDomains={});const t=s.A.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,a.$z)(r)??""]=0:(t[(0,a.$z)("http://"+r)??""]=0,t[(0,a.$z)("https://"+r)??""]=0)}function f(e){const t=s.A.request.crossOriginNoCorsDomains;if(t){let r=(0,a.$z)(e);if(r)return r=r.toLowerCase(),!(0,a.FX)(r,(0,a.Xq)())&&t[r]<Date.now()-36e5}return!1}async function h(e){const t=(0,a.An)(e);e=t.path,"json"===t.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}const r=s.A.request.crossOriginNoCorsDomains,n=(0,a.$z)(e);r&&n&&(r[n.toLowerCase()]=Date.now())}},60694:(e,t,r)=>{r.d(t,{Fi:()=>u,HZ:()=>w,Jf:()=>g,LS:()=>y,Wo:()=>m,bd:()=>v,cr:()=>f,iz:()=>p,qg:()=>d,yG:()=>h});var s=r(84952),n=r(97159);const o={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",knowledgegraphserver:"KnowledgeGraphServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer",videoserver:"VideoServer"},a=Object.values(o),i=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${a.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^/\\n]+)\\/(${a.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),c=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function u(e){return i.test(e)}function d(e){if(null==e)return null;const t=(0,s.An)(e),r=t?.path.match(i)||t?.path.match(l);if(!r)return null;const[,n,a,c,u]=r,d=a.indexOf("/");return{title:f(-1!==d?a.slice(d+1):a),serverType:o[c.toLowerCase()],sublayer:null!=u&&""!==u?parseInt(u,10):null,url:{path:n}}}function p(e){const t=(0,s.An)(e).path.match(c);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function h(e,t){const r=[];if(e){const t=d(e);null!=t&&t.title&&r.push(t.title)}if(t){const e=f(t);r.push(e)}if(2===r.length){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function m(e){let t=(0,s.$z)(e,!0);return!!t&&(t=t.toLowerCase(),t.endsWith(".arcgis.com")&&(t.startsWith("services")||t.startsWith("tiles")||t.startsWith("features")||/^[a-z\d-]+\.svcs(?:qa|dev)?\./.test(t)))}function g(e,t){return e?(0,s.UC)((0,s.zi)(e,t)):e}function w(e){let{url:t}=e;if(!t)return{url:t};t=(0,s.zi)(t,e.logger);const r=(0,s.An)(t),n=d(r.path);let o;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(o=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=p(r.path);null!=e&&(t=e.serviceUrl,o=e.sublayerId)}return{url:(0,s.UC)(t),layerId:o}}function y(e,t,r,o,a){(0,n.w)(t,o,"url",a),o.url&&null!=e.layerId&&(o.url=(0,s.fj)(o.url,r,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),r=t.includes("/services/"),s=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),o=t.includes("/wmsserver");return r&&(s||n||o)}},78888:(e,t,r)=>{r.d(t,{A:()=>m});var s=r(92602),n=r(70333),o=r(49186),a=r(44208),i=r(4718),l=r(91869),c=r(74887),u=r(84952),d=r(60694),p=r(39131),f=r(926),h=r(56058);async function m(e,t){e instanceof URL&&(e=e.toString()),t?.query instanceof URLSearchParams&&(t.query=(0,u.zf)(t.query.toString().replaceAll("+"," ")));const s=(0,u.DB)(e),n=(0,u.w8)(e);n||s||(e=(0,u.S8)(e));const o={url:e,requestOptions:{...t}},i=e=>({data:e,getAllHeaders:S,getHeader:S,httpStatus:200,requestOptions:o.requestOptions,url:o.url}),p=(0,u.sC)(e,w.internalInterceptors);if(p){const e=await L(p,o);if(null!=e)return i(e)}let f=(0,u.sC)(e);if(f){const e=await L(f,o);if(null!=e)return i(e);f.after||f.error||(f=null)}if(e=o.url,"image"===(t=o.requestOptions).responseType&&((0,a.A)("host-webworker")||(0,a.A)("host-node")))throw x("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),o);if("head"===t.method){if(t.body)throw x("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),o);if(s||n)throw x("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),o)}if(await async function(){(0,a.A)("host-webworker")&&!g&&(g=await r.e(369).then(r.bind(r,40369)))}(),g)return g.execute(e,t);const h=new AbortController,m=(0,c.u7)(t,(()=>h.abort())),y={controller:h,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:f,params:o,redoRequest:!1,useIdentity:w.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},v=t.useRequestQueue?async function(e){const t=function(e){let t,r;return"string"==typeof e?(t=(0,u.$z)(e,!0),r=(0,d.Wo)(e)):(t=e.origin,r=(0,d.Wo)(e.toString())),null==t?null:{origin:t,isHosted:r}}(e.params.url);if(!t)return P(e);const{QueueProcessor:s}=await r.e(563).then(r.bind(r,563)),n=(0,l.tE)(U,t.origin,(()=>{const e=t.isHosted?(0,a.A)("request-queue-concurrency-hosted"):(0,a.A)("request-queue-concurrency-non-hosted");return new s({concurrency:e,process:e=>{if((0,c.G4)(e.params.requestOptions))throw x("",(0,c.NK)("Request canceled"),e.params);return P(e)}})}));return n.push(e)}(y):P(y),b=await v.finally((()=>m?.remove()));return f?.after?.(b),b}let g;const w=s.A.request,y="FormData"in globalThis,v=new Set([499,498,403,401]),b=new Set(["COM_0056","COM_0057","SB_0008"]),q=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],S=()=>null,C=Symbol();function O(e){const t=(0,u.$z)(e);return!t||t.endsWith(".arcgis.com")||m._corsServers.includes(t)||(0,u.FL)(t)}function x(e,t,r,s){let n;const a={url:r.url,requestOptions:r.requestOptions,getAllHeaders:S,getHeader:S,ssl:!1};if(t instanceof o.A)return t.details?(t.details=(0,i.o8)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=a,t;if(t){const e=s&&(()=>Array.from(s.headers)),r=s&&(e=>s.headers.get(e)),o=s?.status,i=t.message;i&&(n=i),e&&r&&(a.getAllHeaders=e,a.getHeader=r),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||o||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?(a.messages=[t.details],n??=t.details):(a.messages=t.details,n??=a.messages?.[0]),a.raw=C in t?t[C]:t}return n??="Error",(0,c.zf)(t)?(0,c.NK)():new o.A(e,n,a)}async function A(){n.id||await Promise.all([r.e(6285),r.e(7292),r.e(5122),r.e(6791),r.e(3747),r.e(2507)]).then(r.bind(r,73747))}function T(e){return q.some((t=>t.test(e)))}async function k(e){let t=e.params.url;const r=e.params.requestOptions,s=e.fetchOptions??{},o=(0,u.w8)(t)||(0,u.DB)(t),i=r.responseType||"json",l=o?0:null!=r.timeout?r.timeout:w.timeout;let d=!1;if(!o){e.useSSL&&(t=(0,u.lM)(t));let o={...r.query};e.credentialToken&&(o.token=e.credentialToken);let i=(0,u.x0)(o);(0,a.A)("esri-url-encodes-apostrophe")&&(i=i.replaceAll("'","%27"));const l=t.length+1+i.length;let c;d="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||l>w.maxUrlLength;const f=r.useProxy||!!(0,u.zs)(t);if(f){const e=(0,u.s_)(t);c=e.path,!d&&c.length+1+l>w.maxUrlLength&&(d=!0),e.query&&(o={...e.query,...o})}if("HEAD"===s.method&&(d||f)){if(d){if(l>w.maxUrlLength)throw x("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw x("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(f)throw x("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(d?(s.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,u.a6)(t,o):(s.body=(0,u.x0)(o),s.headers||(s.headers={}),s.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,u.a6)(t,o),f&&(e.useProxy=!0,t=`${c}?${t}`),o.token&&y&&s.body instanceof FormData&&!(0,p.$E)(t)&&s.body.set("token",o.token),r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,u.FX)(t,(0,u.Xq)()))if((0,u.FL)(t))e.withCredentials=!0;else if(n.id){const r=n.id.findServerInfo(t);r?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(s.credentials="include",(0,h.xW)(t)&&await(0,h.m3)(d?(0,u.a6)(t,o):t))}let f,g,v=0,b=!1;l>0&&(v=setTimeout((()=>{b=!0,e.controller.abort()}),l));try{if("native-request-init"===r.responseType)g=s,g.url=t,r.signal?g.signal=r.signal:delete g.signal;else if("image"!==r.responseType||"default"!==s.cache||"GET"!==s.method||d||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!o&&!e.useProxy&&w.proxyUrl&&!O(t)){if(m._beforeFetch&&await m._beforeFetch(t,s),f=await fetch(t,s),m._afterFetch&&await m._afterFetch(f),e.useProxy||function(e){const t=(0,u.$z)(e);t&&!m._corsServers.includes(t)&&m._corsServers.push(t)}(t),"native"===r.responseType)g=f;else if("HEAD"!==s.method)if(f.ok){switch(i){case"array-buffer":g=await f.arrayBuffer();break;case"blob":case"image":g=await f.blob();break;default:g=await f.text()}if(v&&(clearTimeout(v),v=0),"json"===i||"xml"===i||"document"===i)if(g)switch(i){case"json":g=JSON.parse(g);break;case"xml":g=E(g,"application/xml");break;case"document":g=E(g,"text/html")}else g=null;if(g){if("array-buffer"===i||"blob"===i){const e=f.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&g["blob"===i?"size":"byteLength"]<=750)try{const e=await new Response(g).json();e.error&&(g=e)}catch{}}"image"===i&&g instanceof Blob&&(g=await R(URL.createObjectURL(g),e,!0))}}else{g=await f.text();try{g=JSON.parse(g)}catch{}}}else g=await R(t,e)}catch(s){if("AbortError"===s.name){if(b)throw(0,h.ql)();throw(0,c.NK)("Request canceled")}if(!(!f&&s instanceof TypeError&&w.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||O(t))throw s;e.redoRequest=!0,(0,u.oy)({proxyUrl:w.proxyUrl,urlPrefix:(0,u.$z)(t)??""})}finally{v&&clearTimeout(v)}return[f,g]}async function L(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,s;try{s=await e.before(t)}catch(e){r=x("request:interceptor",e,t)}if((s instanceof Error||s instanceof o.A)&&(r=x("request:interceptor",s,t)),r)throw e.error&&e.error(r),r;return s}}function E(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}m._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"],m._beforeFetch=void 0,m._afterFetch=void 0;const U=new Map;async function P(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,o=e.controller.signal,a=r.body;let i=null,l=null;if(y&&"HTMLFormElement"in globalThis&&(a instanceof FormData?i=a:a instanceof HTMLFormElement&&(i=new FormData(a))),"string"==typeof a&&(l=a),e.fetchOptions={cache:r.cacheBust?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:w.priority,redirect:"follow",signal:o},(i||l)&&(e.fetchOptions.body=i||l),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||i?.get("token")),!e.hasToken&&(0,f.Jn)(t)&&(r.query||(r.query={}),r.query.token=s.A.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credential&&!e.credentialToken&&!T(t)&&!(0,c.G4)(o)){let s;"immediate"===r.authMode?(await A(),s=await n.id.getCredential(t,{signal:o})):"no-prompt"===r.authMode?(await A(),s=await n.id.getCredential(t,{prompt:!1,signal:o}).catch((()=>{}))):n.id&&(s=n.id.findCredential(t)),s&&(e.credential=s,e.credentialToken=s.token,e.useSSL=!!s.ssl)}}(e);try{do{[t,r]=await k(e)}while(!await I(e,t,r))}catch(r){const s=x("request:server",r,e.params,t);throw s.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(s),s}const o=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(o)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,u.FL)(o)){const e=(0,u.$z)(o,!0);e&&w.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,h.tz)(r.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&n.id){const e=n.id.findServerInfo(a.server);let t=e?.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=n.id.findCredential(t,a.userId);e&&-1===n.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getAllHeaders:t?()=>Array.from(t.headers):S,getHeader:t?e=>t.headers.get(e):S,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}async function I(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const s=e.params.requestOptions;if(!t||"native"===s.responseType||"native-request-init"===s.responseType)return!0;let o,a;if(r&&(r.error&&"object"==typeof r.error?o=r.error:"error"===r.status&&Array.isArray(r.messages)&&(o={...r},o[C]=r,o.details=r.messages)),!o&&!t.ok)throw o=new Error(`Unable to load ${t.url} status: ${t.status}`),o[C]=r,o;let i,l=null;o&&(a=Number(o.code),l=o.hasOwnProperty("subcode")?Number(o.subcode):null,i=o.messageCode,i=i?.toUpperCase());const c=s.authMode;if(403===a&&(4===l||o.message?.toLowerCase().includes("ssl")&&!o.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===a)&&void 0!==a&&v.has(a)&&!T(e.params.url)&&(403!==a||(!i||!b.has(i))&&(null==l||2===l&&e.credentialToken))){await A();try{const t=await n.id.getCredential(e.params.url,{error:x("request:server",o,e.params),credential:e.credential,prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===c)return e.credential=void 0,e.credentialToken=void 0,!1;o=t}}if(o)throw o;return!0}function R(e,t,r=!1){const s=t.controller.signal,n=new Image;return t.withCredentials?n.crossOrigin="use-credentials":n.crossOrigin="anonymous",n.alt="",n.fetchPriority=w.priority,n.src=e,(0,h.Sx)(n,e,r,s)}},91869:(e,t,r)=>{function s(e,t){for(const r of e.values())if(t(r))return!0;return!1}function n(e,t,r){const s=e.get(t);if(void 0!==s)return s;const n=r();return e.set(t,n),n}function o(e){const t=new Map;return r=>(t.has(r)||t.set(r,e(r)),t.get(r))}r.d(t,{Bj:()=>o,Bs:()=>s,tE:()=>n})},97159:(e,t,r)=>{r.d(t,{M:()=>y,a:()=>g,b:()=>f,e:()=>h,f:()=>a,i:()=>p,p:()=>b,r:()=>l,t:()=>i,w:()=>c});var s=r(70333),n=r(84952),o=r(39131);function a(e,t){const r=t?.url?.path;if(e&&r&&(e=(0,n.s2)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,n.V1)(e,t.portalItem.itemUrl);null!=r&&d.test(r)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return(e=m(e,t?.portal))&&u.test(e)?g(e):e}function i(e,t,r=y.YES){if(null==(e=e&&u.test(e)?w(e):e))return e;!(0,n.oP)(e)&&t?.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let s=(0,n.s2)(e);if(t){const r=t.verifyItemRelativeUrls?.rootPath||t.url?.path;if(r){const o=m(r,t.portal),a=m(s,t.portal);s=(0,n.V1)(a,o,o),null!=s&&s!==a&&s!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=h(s,t?.portal),(0,n.oP)(s)&&(s=(0,n.S8)(s)),t?.resources&&t?.portalItem&&!(0,n.oP)(s)&&!(0,n.DB)(s)&&r===y.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(s),compress:!1}),s}function l(e,t,r){return a(e,r)}function c(e,t,r,s){const n=i(e,s);void 0!==n&&(t[r]=n)}const u=/\/items\/([^/]+)\/resources\/(.*)/,d=/^\.\/resources\//;function p(e){const t=e?.match(u)??null;return t?.[1]??null}function f(e){const t=e?.match(u)??null;if(null==t)return null;const r=t[2],s=r.lastIndexOf("/");if(-1===s){const{path:e,extension:t}=(0,n.xw)(r);return{prefix:null,filename:e,extension:t}}const{path:o,extension:a}=(0,n.xw)(r.slice(s+1));return{prefix:r.slice(0,s),filename:o,extension:a}}function h(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,n.T1)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function m(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,s=(0,n.Xq)();return(0,n.FX)(s,`${s.scheme}://${r}`)?(0,n.T1)(e,t.portalHostname,r):(0,n.T1)(e,r,t.portalHostname)}function g(e){if(!e)return e||null;let t=e;return t&&s.id&&!s.id.findCredential(t)&&(t=(0,o.qG)(t),t=t.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),t=t.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),t=t.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),t}function w(e){if(!e)return e||null;let t=e;return t=t.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),t=t.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),t=t.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),t&&s.id&&!s.id.findCredential(t)&&(t=(0,o.qG)(t)),t}var y,v;(v=y||(y={}))[v.YES=0]="YES",v[v.NO=1]="NO";const b=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return y},ensureMainOnlineDomain:h,fromCDNUrl:w,fromJSON:a,itemIdFromResourceUrl:p,prefixAndFilenameFromResourceUrl:f,read:l,toCDNUrl:g,toJSON:i,write:c},Symbol.toStringTag,{value:"Module"}))}}]);