@arcgis/map-components 6.0.0-next.41 → 6.0.0-next.43

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 (173) hide show
  1. package/dist/cdn/{HOMM5T7F.js → 23FQMZEJ.js} +1 -1
  2. package/dist/cdn/{OT4D3TVG.js → 2KGJ7SZH.js} +1 -1
  3. package/dist/cdn/{GTQOMGD7.js → 2MIHLZFT.js} +1 -1
  4. package/dist/cdn/{NF426VVG.js → 3L2QSX64.js} +1 -1
  5. package/dist/cdn/{IH2T7XRU.js → 3VLSPKTJ.js} +1 -1
  6. package/dist/cdn/3ZRVPLIZ.js +2 -0
  7. package/dist/cdn/{TII37L6V.js → 4FBPT5MA.js} +1 -1
  8. package/dist/cdn/{6WT5CUW4.js → 4IPFHL7W.js} +1 -1
  9. package/dist/cdn/{5XZKVLHC.js → 5ATTOWK4.js} +1 -1
  10. package/dist/cdn/{HUZLTULW.js → 5MRT5VRJ.js} +1 -1
  11. package/dist/cdn/6E4PVTTN.js +2 -0
  12. package/dist/cdn/{JBD7Q5YD.js → 6NCSWYYX.js} +1 -1
  13. package/dist/cdn/{5VK56DPB.js → 6NY67VW5.js} +1 -1
  14. package/dist/cdn/{RX7LVZ5V.js → 6P7V62WJ.js} +1 -1
  15. package/dist/cdn/{2BKWAHTD.js → 6TLX4R5A.js} +1 -1
  16. package/dist/cdn/6YPY3QWH.js +2 -0
  17. package/dist/cdn/72KS3TKM.js +2 -0
  18. package/dist/cdn/{5IWCWL2Q.js → 7FB4DOVH.js} +1 -1
  19. package/dist/cdn/{DYKRS7YX.js → 7GXJ6HJZ.js} +1 -1
  20. package/dist/cdn/7WUY57GO.js +2 -0
  21. package/dist/cdn/{DVLTVCIH.js → 7YSYI32G.js} +1 -1
  22. package/dist/cdn/{AMRGLUBB.js → AKSCONMP.js} +1 -1
  23. package/dist/cdn/{FTRRLFYT.js → B6VGTQ4L.js} +1 -1
  24. package/dist/cdn/BQCOYIEH.js +2 -0
  25. package/dist/cdn/{Y6MM3GUE.js → BVWTI63V.js} +1 -1
  26. package/dist/cdn/{4DRKK3S6.js → CBCAUSDJ.js} +1 -1
  27. package/dist/cdn/{CX23L4OX.js → CPK3PMBE.js} +1 -1
  28. package/dist/cdn/CSVVXWVY.js +2 -0
  29. package/dist/cdn/{Y4GL4RZF.js → CX5AZKYT.js} +1 -1
  30. package/dist/cdn/{2J6WEB6T.js → DEICCDP4.js} +1 -1
  31. package/dist/cdn/DJAFLMKA.js +2 -0
  32. package/dist/cdn/DSINA62N.js +4 -0
  33. package/dist/cdn/{NYIKMTKG.js → E4ZUESKS.js} +1 -1
  34. package/dist/cdn/{UJBFSJDF.js → E5BLQ5FK.js} +1 -1
  35. package/dist/cdn/{KKSTZRNG.js → EDGXY4OL.js} +1 -1
  36. package/dist/cdn/{YEPFWDQQ.js → EL5AFBNE.js} +1 -1
  37. package/dist/cdn/{GEZIZQV6.js → EN5NCDOJ.js} +1 -1
  38. package/dist/cdn/{QNQOBXLM.js → EQA4WO3H.js} +1 -1
  39. package/dist/cdn/{JILA7S66.js → FLSEDKWU.js} +1 -1
  40. package/dist/cdn/{625O4F4L.js → GQVCBPZS.js} +1 -1
  41. package/dist/cdn/{I7XTEFQP.js → GSGFAJCR.js} +1 -1
  42. package/dist/cdn/{BXBPEOE3.js → GSU7GNNP.js} +1 -1
  43. package/dist/cdn/{IZFEOYED.js → H2PXK4AT.js} +1 -1
  44. package/dist/cdn/{RCJ3GROZ.js → HBQAYD5H.js} +1 -1
  45. package/dist/cdn/{D7RGMUI2.js → IAJNBAC5.js} +1 -1
  46. package/dist/cdn/{JPQ5ELDQ.js → INMMQJOE.js} +1 -1
  47. package/dist/cdn/{OMDFAKMT.js → IQYLP2H7.js} +1 -1
  48. package/dist/cdn/{DVH35LZL.js → J2K2LRII.js} +1 -1
  49. package/dist/cdn/JUTSSJJF.js +2 -0
  50. package/dist/cdn/JZYDXRQ6.js +4 -0
  51. package/dist/cdn/{Y6ZJNJZ7.js → KSOO3XZ2.js} +1 -1
  52. package/dist/cdn/{KLSIUZNN.js → MKL4YXDU.js} +1 -1
  53. package/dist/cdn/{EMOYKTQL.js → O2BFE6NY.js} +1 -1
  54. package/dist/cdn/OUFB4LJK.js +2 -0
  55. package/dist/cdn/{GFC6LS4L.js → OYG42YJL.js} +1 -1
  56. package/dist/cdn/{O2RCWKKW.js → PD2BELF2.js} +1 -1
  57. package/dist/cdn/{T2JBUILX.js → PFYEJDRJ.js} +1 -1
  58. package/dist/cdn/{JWCEHGEZ.js → PNMBUGPD.js} +1 -1
  59. package/dist/cdn/QEAEEU72.js +2 -0
  60. package/dist/cdn/{U53HTVZS.js → RUJLTSDR.js} +1 -1
  61. package/dist/cdn/{IH7XQCY4.js → SA7B3XQG.js} +1 -1
  62. package/dist/cdn/{CNUAMIZQ.js → T5RX6NXT.js} +2 -2
  63. package/dist/cdn/T7PDMEAD.js +2 -0
  64. package/dist/cdn/{7PMJ7HCH.js → U5BYZI4G.js} +1 -1
  65. package/dist/cdn/UPXNXNTT.js +2 -0
  66. package/dist/cdn/{MG2HQ3FT.js → UW3FYQWG.js} +1 -1
  67. package/dist/cdn/V34ZYXUI.js +2 -0
  68. package/dist/cdn/{WRB2DEQ6.js → W6ILOTBW.js} +1 -1
  69. package/dist/cdn/{EZFBYRI4.js → WYX6WXW4.js} +1 -1
  70. package/dist/cdn/{JFE63ANJ.js → X27EW2YC.js} +1 -1
  71. package/dist/cdn/{6GFNMSM4.js → XHHVIWXO.js} +1 -1
  72. package/dist/cdn/{7P24CQF4.js → XOWOMVSW.js} +1 -1
  73. package/dist/cdn/{CRJB272X.js → XURPEC42.js} +1 -1
  74. package/dist/cdn/{WVRIR3PK.js → YB6AHPU5.js} +1 -1
  75. package/dist/cdn/{LQYTLVCL.js → YRQXG7GX.js} +1 -1
  76. package/dist/cdn/{LHH3PS5H.js → ZVGWUEUE.js} +1 -1
  77. package/dist/cdn/assets/time-zone-chip/t9n/messages.en.json +1 -1
  78. package/dist/cdn/index.js +1 -1
  79. package/dist/cdn/main.css +1 -1
  80. package/dist/chunks/AnalysisViewModel.js +1 -1
  81. package/dist/chunks/async-utils.js +1 -1
  82. package/dist/chunks/slots.js +1 -1
  83. package/dist/components/arcgis-daylight/customElement.d.ts +43 -50
  84. package/dist/components/arcgis-daylight/customElement.js +231 -225
  85. package/dist/components/arcgis-editor/customElement.d.ts +0 -1
  86. package/dist/components/arcgis-elevation-profile/customElement.d.ts +8 -0
  87. package/dist/components/arcgis-elevation-profile/customElement.js +39 -38
  88. package/dist/components/arcgis-line-of-sight/customElement.d.ts +4 -1
  89. package/dist/components/arcgis-link-chart/customElement.d.ts +0 -1
  90. package/dist/components/arcgis-map/customElement.d.ts +0 -1
  91. package/dist/components/arcgis-scene/customElement.d.ts +0 -1
  92. package/dist/components/arcgis-shadow-cast/customElement.d.ts +36 -24
  93. package/dist/components/arcgis-shadow-cast/customElement.js +105 -128
  94. package/dist/components/arcgis-sketch/customElement.d.ts +0 -1
  95. package/dist/components/arcgis-time-zone-chip/customElement.d.ts +8 -0
  96. package/dist/components/arcgis-time-zone-chip/customElement.js +27 -18
  97. package/dist/components/arcgis-utility-network-trace-locations/customElement.js +34 -34
  98. package/dist/components/types.d.ts +7 -0
  99. package/dist/docs/api.json +1 -1
  100. package/dist/docs/docs.json +1 -1
  101. package/dist/docs/vscode.html-custom-data.json +1 -1
  102. package/dist/docs/web-types.json +1 -1
  103. package/dist/index.d.ts +0 -10
  104. package/dist/loader.js +3 -4
  105. package/dist/types/lumina.d.ts +6 -11
  106. package/dist/types/preact.d.ts +6 -12
  107. package/dist/types/react.d.ts +6 -13
  108. package/dist/types/stencil.d.ts +6 -11
  109. package/package.json +7 -7
  110. package/dist/cdn/27TSPXYV.js +0 -2
  111. package/dist/cdn/2JSC2QUL.js +0 -2
  112. package/dist/cdn/43IGD6V3.js +0 -2
  113. package/dist/cdn/4JR57ZIQ.js +0 -2
  114. package/dist/cdn/6BT6RP22.js +0 -2
  115. package/dist/cdn/6KYZMT4A.js +0 -2
  116. package/dist/cdn/BJUFDQGX.js +0 -2
  117. package/dist/cdn/DFNH6YRR.js +0 -2
  118. package/dist/cdn/GOMR7D5M.js +0 -2
  119. package/dist/cdn/HKKNU4CX.js +0 -2
  120. package/dist/cdn/LZUAJU6O.js +0 -2
  121. package/dist/cdn/PYBUTNHM.js +0 -2
  122. package/dist/cdn/SKV3CQSZ.js +0 -2
  123. package/dist/cdn/TXVB6WRV.js +0 -2
  124. package/dist/cdn/UYDXI4AK.js +0 -4
  125. package/dist/cdn/YAWLVMV6.js +0 -2
  126. package/dist/cdn/YGBYB3BZ.js +0 -2
  127. package/dist/components/arcgis-utility-network-validate-topology/customElement.d.ts +0 -100
  128. package/dist/components/arcgis-utility-network-validate-topology/customElement.js +0 -44
  129. package/dist/components/arcgis-utility-network-validate-topology/index.d.ts +0 -1
  130. package/dist/components/arcgis-utility-network-validate-topology/index.js +0 -1
  131. /package/dist/cdn/{SLQPDAGN.js → 237ZYFAI.js} +0 -0
  132. /package/dist/cdn/{AYQJ2LTV.js → 4LNUUNTS.js} +0 -0
  133. /package/dist/cdn/{OLSESBZ7.js → 4RG2L4NX.js} +0 -0
  134. /package/dist/cdn/{N2YWWQOS.js → 6F6UDFL6.js} +0 -0
  135. /package/dist/cdn/{62HMPABL.js → 6FZQAFDW.js} +0 -0
  136. /package/dist/cdn/{RTDY3HLR.js → 6RNYBJQG.js} +0 -0
  137. /package/dist/cdn/{ZCL4XHIZ.js → 6YT2MRU6.js} +0 -0
  138. /package/dist/cdn/{XQ2WXTW7.js → AAF7U7C7.js} +0 -0
  139. /package/dist/cdn/{IRFIHD5X.js → AZFQTGM4.js} +0 -0
  140. /package/dist/cdn/{XCSF7KJK.js → BVR6RYPL.js} +0 -0
  141. /package/dist/cdn/{DPEWQQEB.js → C3VCBV5R.js} +0 -0
  142. /package/dist/cdn/{ZSKO7HLH.js → COJJ4ST7.js} +0 -0
  143. /package/dist/cdn/{NVN2CATF.js → CSLBASOL.js} +0 -0
  144. /package/dist/cdn/{2P5AJORF.js → DDUJHOQ5.js} +0 -0
  145. /package/dist/cdn/{DLUFAV4S.js → F25B6VFT.js} +0 -0
  146. /package/dist/cdn/{PWZHB6VD.js → FC4U5FYO.js} +0 -0
  147. /package/dist/cdn/{SLNXNVPI.js → H3SNBMDP.js} +0 -0
  148. /package/dist/cdn/{QWMDZDQA.js → HDNFEQXP.js} +0 -0
  149. /package/dist/cdn/{FJMXBIN5.js → HMAEKQ63.js} +0 -0
  150. /package/dist/cdn/{T34W3GKP.js → HRKFC3ZC.js} +0 -0
  151. /package/dist/cdn/{5GTPIPN7.js → ID3JLPN6.js} +0 -0
  152. /package/dist/cdn/{KOMTNQPT.js → IKNNVF57.js} +0 -0
  153. /package/dist/cdn/{OFBWNR54.js → J3U6IFQO.js} +0 -0
  154. /package/dist/cdn/{CHMBPPHS.js → JUG5VVPL.js} +0 -0
  155. /package/dist/cdn/{MEISDI2H.js → KYUDUFNZ.js} +0 -0
  156. /package/dist/cdn/{4LWSF6AI.js → L63YJ5AF.js} +0 -0
  157. /package/dist/cdn/{LVIYMA67.js → LGPNCTTW.js} +0 -0
  158. /package/dist/cdn/{LS4U4GD5.js → LH4SQVC2.js} +0 -0
  159. /package/dist/cdn/{XGWYQ7FU.js → LNUFIKD5.js} +0 -0
  160. /package/dist/cdn/{7YT5W57B.js → NIASADUV.js} +0 -0
  161. /package/dist/cdn/{UDXDE3LW.js → NJ3CJS46.js} +0 -0
  162. /package/dist/cdn/{6SL7YNKF.js → NXC47WWQ.js} +0 -0
  163. /package/dist/cdn/{ZNIMZP5R.js → O527UXXI.js} +0 -0
  164. /package/dist/cdn/{G4IKO2R6.js → OXZOWO5A.js} +0 -0
  165. /package/dist/cdn/{SFDCS6A2.js → PHFJU5KL.js} +0 -0
  166. /package/dist/cdn/{TP2KQRW6.js → QHK5I5OO.js} +0 -0
  167. /package/dist/cdn/{IAYL44LK.js → RB3QNSQJ.js} +0 -0
  168. /package/dist/cdn/{ECA47Z37.js → T4CJDMMZ.js} +0 -0
  169. /package/dist/cdn/{AKTIOEYM.js → TAU22PX7.js} +0 -0
  170. /package/dist/cdn/{ZHYXFOYU.js → VP47DYTR.js} +0 -0
  171. /package/dist/cdn/{NVKOZL7X.js → WMP77MLQ.js} +0 -0
  172. /package/dist/cdn/{5GGAWGSN.js → WMRMVZHH.js} +0 -0
  173. /package/dist/cdn/{GCPR7XFU.js → YEEPGAEP.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import i from"./DSIYRWN2.js";import{a as L}from"./Y6WTYXVP.js";import"./FH3WFF5O.js";import h from"./WRB2DEQ6.js";import{a as D}from"./YEPGUNSV.js";import g from"./DP2UXNPJ.js";import f from"./HU57LQOA.js";import e from"./SKV3CQSZ.js";import{a as E}from"./WJQUE4DR.js";import{b as Z,c as U,d as j}from"./366GLQ5R.js";import d from"./ZRT4RJ62.js";import{a as z}from"./SAI7K4OO.js";import c from"./3VFPLRD3.js";import b from"./E3RBRDUV.js";import{f as H,h as B}from"./FY7P5YLX.js";import"./IRDDLVT2.js";import a from"./TJHVEY7T.js";import{a as I}from"./LXME6MU5.js";import{P as v,Q as m,R as O,T as A,X as u,Y as P,_ as N,a as R,b as n,o as C,x as $}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([J,W,Q,{initializeProjection:Y},{renderingSanitizer:M},{stripHTML:b},{substitute:g,formatNumber:y},{when:ee,watch:c},{getGraphicOriginTitle:te},,,,V,,,{e:T},{d:q},k])=>{var ie=R`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-border-color: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty,.content-hidden){padding:var(--arcgis-internal-padding-md, var(--calcite-space-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-space-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-space-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-space-2xs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-space-lg);width:var(--calcite-space-lg);height:var(--calcite-space-lg)}.action-image{flex:0 0 var(--calcite-space-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-space-lg);height:var(--calcite-space-lg)}.content-feature{--calcite-flow-item-footer-padding: 0;--calcite-flow-header-top-space: 0}.feature-menu-observer{flex:0 0 1px;height:1px;margin-block-start:-1px}.action-exit{transform:scaleX(-1)}.flow-item-drill-in{--calcite-flow-item-footer-padding: 0}.diagnostics-notice{padding:var(--calcite-space-md)}`;function se(_){return _?.declaredClass.startsWith("esri.layers.")??!1}function ae(_){if(!(!_||!("featureReduction"in _)))return _.featureReduction?.type}var ne=V(Q),oe=5,S=class extends O{constructor(){super(...arguments),this._zoomToFeature=new J({icon:"magnifying-glass-plus",id:"zoom-to-feature",title:"{messages.zoom}"}),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this._loadMoreFeatures()},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._setFocusAnimationFrameId=null,this._setFocusAnimationFrameResolve=null,this._rootFlowItemNode=v(),this._featureMenuViewportNode=v(),this._actionBarMenuNode=v(),this._flowContainerNode=v(),this._aggregatedFeaturesComponent=v(),this.messages=z(),this._selectedFeatureComponent=v(),this._actionFlowItems=new WeakSet,this._direction=H(),this._cancelOpenRelatedFeature=()=>{this._openRelatedFeatureAbortController=E(this._openRelatedFeatureAbortController)},this._spinnerVisible=!1,this._openRelatedFeatureAbortController=null,this.flowItems=new W,this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._hasActionsStartSlotContent=!1,this._hasActionsEndSlotContent=!1,this._selectedFeatureLoading=!1,this._lastSettledHeading="",this.viewModel=ne(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.focusTrapEnabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.diagnostics=this.viewModel.diagnostics,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.effectiveHeading=this.viewModel.effectiveHeading,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureItemAbilities=this.viewModel.featureItemAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new W,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSelectFeature=!1,this.hideSpinner=!1,this.hideContent=!1,this.chartAnimationDisabled=this.viewModel.featureItemAbilities?.chartAnimation,this.hideAttachmentsContent=this.viewModel.featureItemAbilities?.attachmentsContent,this.hideEmptyRelationshipContent=!1,this.hideCustomContent=this.viewModel.featureItemAbilities?.customContent,this.hideExpressionContent=!1,this.hideFieldsContent=this.viewModel.featureItemAbilities?.fieldsContent,this.hideMediaContent=this.viewModel.featureItemAbilities?.mediaContent,this.hideRelationshipContent=this.viewModel.featureItemAbilities?.relationshipContent,this.hideTextContent=this.viewModel.featureItemAbilities?.textContent,this.hideUtilityNetworkContent=this.viewModel.featureItemAbilities?.utilityNetworkAssociationsContent,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.open,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisClose=$(),this.arcgisPropertyChange=B()("active","collapsed","effectiveHeading","featureCount","featureMenuOpen","features","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=$(),this.arcgisTriggerAction=$()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_aggregatedFeatureCount:16,_selectedAggregatedFeatureIndex:16,_aggregatedFeaturesLoading:16,_hasActionsStartSlotContent:16,_hasActionsEndSlotContent:16,_selectedFeatureLoading:16,_lastSettledHeading:16,_selectedFeatureViewModel:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,_selectedFeatureHeading:16,_headingLabel:16,_backLabel:16,_selectedFeatureContent:16,_selectedFeaturePending:16,_featureFlowItemSelected:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,focusTrapEnabled:5,collapseDirection:1,collapsed:5,content:1,diagnostics:0,defaultPopupTemplateEnabled:5,effectiveHeading:32,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureItemAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSelectFeature:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideEmptyRelationshipContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=ie}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){let{selectedFeatureItem:e}=this.viewModel,t=this.heading||this._selectedFeatureHeading,i=this.content||this._selectedFeatureContent,s=e?.state==="error"||this._selectedFeatureViewModel?.state==="error";return this.showCollapseButton&&(this.initialDisplayMode==="list"||this._selectedFeaturePending||!s&&!t&&i==null&&e?.formattedAttributes==null||!!t&&!!i)}get _selectedFeatureHeading(){return this.viewModel.selectedFeatureItem?.heading}get _headingLabel(){let e=this._selectedFeatureHeading??this.heading;return e?b(e):void 0}get _backLabel(){let e=this._headingLabel,{messages:t}=this;return e?g(t.backLabel??"",{title:e}):t.back}get _selectedFeatureContent(){return this.viewModel.selectedFeatureItem?.content}get _selectedFeaturePending(){let{selectedFeature:e,selectedFeatureItem:t}=this.viewModel;if(!e)return!1;let i=this._selectedFeatureViewModel,s=i?.state;return t==null||t.waitingForContent||i?.graphic!==e||s!=="ready"&&s!=="error"}get _featureFlowItemSelected(){return this.initialDisplayMode==="list"?!!this.selectedFeature:!this.featureMenuOpen}clear(){this.viewModel.clear()}close(){this.open=!1}destroy(){return this._destroyPromise??=this._destroy()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let{signal:i}=t??{},s=new AbortController,{signal:a}=s,o=i?AbortSignal.any([a,i]):a;this._fetchFeaturesController=s,!e&&this.view&&this.location&&(await Y(this.location.spatialReference,this.view.spatialReference,null,{signal:o}),e=this.view.toScreen(this.location)??void 0),e&&await this.viewModel.fetchFeatures(e,{...t,signal:o})}next(){this.viewModel.next()}previous(){this.viewModel.previous()}async setFocus(){this._cancelSetFocusAnimationFrame(),await new Promise(e=>{this._setFocusAnimationFrameResolve=e,this._setFocusAnimationFrameId=requestAnimationFrame(()=>{this._setFocusAnimationFrameId=null;try{if(!this.isConnected||!this.viewModel?.active)return;this._flowContainerNode.value?.setFocus()}finally{this._resolveSetFocusAnimationFrame()}})})}connectedCallback(){super.connectedCallback(),this._createSpinner()}willUpdate(){let e=this._selectedFeaturePending,{effectiveHeading:t}=this.viewModel;(t||!e)&&(this._lastSettledHeading=t??"")}updated(){let e=this._selectedFeatureComponent.value??void 0;this.selectedFeatureComponent!==e&&(this._selectedFeatureViewModel=e?.viewModel,C(()=>this.selectedFeatureComponent=e)),this.componentOnReady().then(()=>{let t=this._featureMenuIntersectionObserverNode;this.isConnected&&t&&(this._featureMenuIntersectionObserver.unobserve(t),this._featureMenuIntersectionObserver.observe(t))})}loaded(){this.manager.onLifecycle(()=>[k({getLoading:()=>this.viewModel.waitingForResult,setEffectiveLoading:e=>{this._spinnerVisible=e,this._createSpinner()},timeout:25,minShownDuration:0}),k({getLoading:()=>this._selectedFeaturePending,setEffectiveLoading:e=>{this._selectedFeatureLoading=e}}),ee(()=>[this.initialDisplayMode==="list"&&!!this.viewModel?.selectedFeature,this.viewModel?.active],()=>this._setFocusIfTrapEnabled()),c(()=>[this.flowItems?.length,this.featureMenuOpen],()=>this._setFocusIfTrapEnabled()),c(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),c(()=>this.viewModel?.selectedFeature,()=>this._removeFlowItems()),c(()=>this.viewModel?.view?.scale,()=>this._viewScaleChange()),c(()=>this.viewModel?.view,(e,t)=>t&&this._viewChange()),c(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),c(()=>this.selectedFeatureComponent?.viewModel,(e,t)=>t&&this._removeFlowItems()),c(()=>[this.viewModel?.features.at(0),this.viewModel?.featureCount??0],([e,t],i)=>{let[s,a]=i??[void 0,0];(e!==s||t<a)&&this._featureMenuViewportScrollTop()}),c(()=>[this.featureMenuOpen,this.initialDisplayMode,this.open],()=>{this.viewModel.featureMenuOpen=this.featureMenuOpen,this.open&&(this.featureMenuOpen||this.initialDisplayMode==="list")&&(this.viewModel.featurePage=1)},{initial:!0}),c(()=>this.flowItems.toArray(),()=>this._handleFlowItemsChange(),{initial:!0}),c(()=>this.viewModel.aggregatedFeaturesEnabled,e=>{e||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._removeFlowItems())}),c(()=>this.referenceElement,(e,t)=>{this._removeSpinner(t),this._createSpinner()},{initial:!0}),c(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.pendingLocation,this.viewModel?.open],()=>this._createSpinner(),{initial:!0})])}disconnectedCallback(){super.disconnectedCallback(),this._selectedFeatureLoading=!1,this._spinnerVisible=!1,this._cancelSetFocusAnimationFrame(),this._removeSpinner(this.referenceElement)}async _destroy(){this._removeSpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._cancelSetFocusAnimationFrame(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect(),this._selectedFeatureViewModel=void 0,C(()=>this.selectedFeatureComponent=void 0),await this.manager.destroy()}_loadMoreFeatures(){let{viewModel:e}=this,{featurePage:t,featuresPerPage:i,features:s}=e;e.open&&(this.initialDisplayMode==="list"||this.featureMenuOpen)&&t!=null&&t*i<s.length&&(e.featurePage=t+1)}_setFocusIfTrapEnabled(){this.focusTrapEnabled&&this.setFocus()}_resolveSetFocusAnimationFrame(){let e=this._setFocusAnimationFrameResolve;this._setFocusAnimationFrameResolve=null,e?.()}_cancelSetFocusAnimationFrame(){this._setFocusAnimationFrameId!=null&&(cancelAnimationFrame(this._setFocusAnimationFrameId),this._setFocusAnimationFrameId=null),this._resolveSetFocusAnimationFrame()}_cancelFetchingFeatures(){this._fetchFeaturesController=E(this._fetchFeaturesController)}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{features:e,featurePage:t,featuresPerPage:i}=this.viewModel,s=new Map,a=Math.min((t??0)*i,e.length);for(let o=0;o<a;o++){let r=e[o],l=T(r),d=se(l)?l:null,h=s.get(d);h||(h=[],s.set(d,h)),h.push(o)}return s}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;if(this._openRelatedFeatureAbortController=t,await e.updateGeometry(),t.signal.aborted)return;let i=e.graphic,s=i?.geometry;if(s==null||i==null){this._openRelatedFeatureAbortController=null;return}if(this._removeFlowItems(),await this.viewModel.zoomTo({target:s}),t.signal.aborted)return;let{labelPointExecute:a}=await $arcgis.t(m=>m[0],"geometry/operators/labelPointOperator");if(t.signal.aborted)return;let o=a(s);o!=null&&(this.location=o),this.features=[i],this.open=!0,this._openRelatedFeatureAbortController=null}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?this.selectedFeatureIndex=-1:this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?this.selectedFeatureIndex=-1:this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"&&this._handleFeatureMenuBack()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){e!==this._featureMenuIntersectionObserverNode&&(this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserverNode=e??null)}_getActionLabel(e,t){if(e.id!=="zoom-to-feature")return null;let{messages:i}=this,s=t?.heading,a=t?s&&b(s):this._headingLabel;return a?g(i.zoomLabel??"",{messages:i,title:a}):i.zoom??""}_getActionTitle(e,t){let{messages:i}=this,s=t?t.graphic:this.selectedFeature,{id:a}=e,o=s?.attributes,r=e.title??"",l=a==="zoom-to-feature"?g(r,{messages:i}):a==="remove-selected-feature"?g(r,{messages:i}):a==="zoom-to-aggregated-features"?g(r,{messages:i}):a==="browse-aggregated-features"?g(r,{messages:i}):e.title;return l&&o?g(l,o):l??""}_onMainKeydown(e){let{key:t}=e;e.defaultPrevented||Z(e)||(j(t,this._direction,{horizontalOnly:!0})&&(e.preventDefault(),e.stopPropagation(),this._closeFeatureMenu(),this.previous()),U(t,this._direction,{horizontalOnly:!0})&&(e.preventDefault(),e.stopPropagation(),this._closeFeatureMenu(),this.next()))}_featureMenuViewportScrollTop(){this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:i,waitingForResult:s}=this.viewModel;s||!i||e===t||e===-1||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e,t=this.flowItems.getItemAt(this.flowItems.length-1)){if(e.disabled)return;e?.type==="toggle"&&(e.value=!e.value);let i=t&&"allActions"in t?t.viewModel:void 0;q(e,this.viewModel,i),this.arcgisTriggerAction.emit({action:e})}_viewScaleChange(){let{selectedFeature:e}=this,t=T(e);!e?.isAggregate||ae(t)!=="cluster"||(this.viewModel.aggregatedFeaturesEnabled=!1,this.open=!1,this.clear())}_viewChange(){this.viewModel.clear(),this.open=!1,this._aggregatedFeatureCount=0,this._removeFlowItems()}_handleAggregatedFeaturesPropertyChange({detail:e,target:t}){e.name==="aggregatedFeatureCount"&&(this._aggregatedFeatureCount=t.aggregatedFeatureCount),e.name==="selectedAggregatedFeatureIndex"&&(this._selectedAggregatedFeatureIndex=t.selectedAggregatedFeatureIndex,this._syncSelectedDrillInFeature()),e.name==="loading"&&(this._aggregatedFeaturesLoading=t.loading)}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_handleFlowItemsChange(){this._syncSelectedDrillInFeature(),this.flowItems.forEach(e=>{!("allActions"in e)||this._actionFlowItems.has(e)||(this._actionFlowItems.add(e),e.componentOnReady().then(()=>{this.isConnected&&this.flowItems.includes(e)&&this.requestUpdate()}))})}_syncSelectedDrillInFeature(){let e=this.flowItems.getItemAt(this.flowItems.length-1);C(()=>this.selectedDrillInFeature=e?.graphic??void 0)}_removeFlowItems(){this.viewModel.aggregatedFeaturesEnabled=!1,this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_getHeading(){if(this.hideHeading)return"";let{effectiveHeading:e}=this.viewModel;return e||!this._selectedFeaturePending?e??"":this._lastSettledHeading||(this._selectedFeatureLoading?this.messages.loading??"":"")}_handleActionsStartSlotChange(e){this._hasActionsStartSlotContent=L(e),this._updateSlottedActionTextEnabled(e.currentTarget)}_handleActionsEndSlotChange(e){this._hasActionsEndSlotContent=L(e),this._updateSlottedActionTextEnabled(e.currentTarget)}_updateSlottedActionTextEnabled(e){let t=!this._hideActionText;e.assignedElements({flatten:!0}).forEach(i=>{(i.matches("calcite-action")?[i]:i.querySelectorAll("calcite-action")).forEach(s=>s.textEnabled=t)})}_removeSpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl),this._spinnerEl=void 0}_createSpinner(){let e=this.referenceElement;e&&(this._removeSpinner(e),this._spinnerEl=P(n`<arcgis-spinner .label=${this.messages.loading??""} .trackLocation=${!this.hideSpinner&&this.viewModel.open&&this._spinnerVisible} .location=${this.viewModel?.pendingLocation??this.viewModel?.location??void 0} .referenceElement=${e} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}#e(e){let t=e&&"allActions"in e?e:void 0,{selectedFeatureItem:i}=this.viewModel;if(t&&!t.allActions)return[];let s=t?t.isFeatureFromTable:i?.isFeatureFromTable;return(t?.allActions??i?.allActions??(!e&&this.viewModel.includeDefaultActions?this.viewModel.defaultActions.concat(this.viewModel.actions):this.viewModel.actions)).toArray().filter(a=>!(e&&a.id==="browse-aggregated-features")&&!(s&&!this.location&&a.id===this._zoomToFeature.id))}render(){return n`<div class="root">${this._renderContentContainer()}</div>`}_renderFeatureNavigation(){return[this._renderPagination(()=>this._previousFeature(),()=>this._nextFeature()),this.initialDisplayMode==="list"?this._renderFeaturePaginationText(this.viewModel.featureCount,this.viewModel.selectedFeatureIndex):this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?n`<div slot=header-top class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(e,t){let{messages:i}=this;return n`<div class="pagination-text">${g(i.pageText??"",{index:y(t+1),total:y(e)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:i,streamingFeatures:s,selectedFeatureIndex:a}=t;return n`<calcite-action class="pagination-menu-button" icon=list .label=${e.showAllFeatures??""} .loading=${s} @click=${this._handlePaginationMenuButton} .text=${g(e.pageText??"",{index:y(a+1),total:y(i)})} text-enabled title=${e.showAllFeatures??""??u}></calcite-action>`}_renderPagination(e,t){let{previous:i,next:s}=this.messages;return n`<calcite-action-bar class="pagination-action-bar" expand-toggle-disabled layout=horizontal overflow-mode=none scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${i??""} @click=${e} .text=${i??""} title=${i??""??u}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${s??""} @click=${t} .text=${s??""} title=${s??""??u}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e){let{initialDisplayMode:t}=this,{featureModels:i,selectedFeatureIndex:s}=this.viewModel,a=i[e],o=a?.state==="ready"?a.heading:"",r=e===s;return n`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(e)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(e)} .selected=${r} @calciteListItemSelect=${()=>this._selectFeature(e)}><span .innerHTML=${(M.sanitize(o)||(a?.state==="loading"?this.messages.loading:this.messages.untitled))??""} slot=content></span>${t==="list"?n`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,i=this._groupResultsByLayer(),s=this.initialDisplayMode==="list"?"none":"single";return t.features.length?n`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${s}>${Array.from(i,([a,o])=>{let r=o.map(d=>this._renderFeatureMenuItem(d)),l=a?a.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&l!==null?D(a??"map-graphics",n`<calcite-list-item-group .heading=${l}>${r}</calcite-list-item-group>`):r})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?n`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??u}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(e){let{headingLevel:t,hideCloseButton:i,_isCollapsed:s,_collapseEnabled:a,featureNavigationTop:o,initialDisplayMode:r,selectedFeature:l,hideHeading:d}=this,{active:h,selectedFeatureItem:f,content:F}=this.viewModel,p=this._getHeading();if(r==="list"&&!l)return null;let w=!this._selectedFeaturePending&&(f?!f.content:!F);return n`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${A(I({"content-feature":!0,"flow-item-collapsed":s}))} .closable=${!i} .closed=${!h} .collapsed=${s} .collapseDirection=${this.collapseDirection??(o?"down":"up")} .collapsible=${a} .headingLevel=${t} .selected=${e} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController||this._selectedFeatureLoading} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} @keydown=${this._onMainKeydown} .heading=${!d&&p?b(p):void 0} ${m(this._rootFlowItemNode)}>${this._renderHeader()}${!d&&p?n`<span slot=heading><span .innerHTML=${M.sanitize(p??"")??""}></span></span>`:null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${A(I("container","content-container",{"content-hidden":w}))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderDiagnosticsRefineResults(){let{messages:e}=this,{view:t}=this.viewModel;return t!=null&&"effectiveMaxZoom"in t.constraints&&t.constraints.effectiveMaxZoom>=0&&t.zoom>=t.constraints.effectiveMaxZoom?e.maxRecordCountDescriptionRefineResultsMaxZoomLevel:e.maxRecordCountDescriptionRefineResults}_renderDiagnosticsList(e){let{messages:t}=this,i=Array.from(e,s=>te(s)??t.untitled);return i.length?n`<p>${t.maxRecordCountDescriptionWithLayerList}</p><ul>${i.map(s=>n`<li>${s}</li>`)}</ul><p>${this._renderDiagnosticsRefineResults()}</p>`:null}_renderDiagnosticsMultipleLayers(){let{messages:e}=this;return n`<p>${e.maxRecordCountDescriptionMultipleLayers}</p><p>${this._renderDiagnosticsRefineResults()}</p>`}_renderDiagnostics(){let{messages:e}=this,{diagnostics:t}=this.viewModel,i=t?.layerLimitExceeded;return i?.size?n`<calcite-notice class="diagnostics-notice" open kind=info scale=s><span slot=title>${e.maxRecordCountHeading}</span><div slot=message>${i.size<=oe?this._renderDiagnosticsList(i):this._renderDiagnosticsMultipleLayers()}</div></calcite-notice>`:null}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:i,messages:s,initialDisplayMode:a,featureMenuOpen:o,_featureFlowItemSelected:r,_collapseEnabled:l,_isCollapsed:d,featureNavigationTop:h,headingLevel:f}=this,{active:F,features:p,streamingFeatures:w}=e,G=i??s.selectFeature,x=this._backLabel;if(a==="feature"&&!o)return null;let K=!r;return n`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${A(I({"flow-item-collapsed":d}))} .closable=${!t} .closed=${!F} .collapsed=${a==="list"&&d} .collapseDirection=${this.collapseDirection??(h?"down":"up")} .collapsible=${a==="list"&&l} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand,back:x}} .description=${this.hideFeatureMenuHeading?void 0:g(s.total??"",{total:p.length})} .heading=${this.hideFeatureMenuHeading?void 0:G} .headingLevel=${f} .loading=${e.waitingForResult} .selected=${K} @calciteFlowItemBack=${X=>{X.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${m(this._featureMenuViewportNode)}>${a==="list"?this._renderHeaderActions():null}${w?n`<calcite-loader class="loader" inline .label=${s.loading??""} slot=header-actions-end></calcite-loader>`:null}${this._renderDiagnostics()}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" aria-hidden=true ${m(this._featureMenuIntersectionObserverCreated)}></div>${a==="feature"?n`<calcite-button scale=s appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full .label=${x} title=${x??u}>${s.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{hideCloseButton:i,active:s,hideHeading:a,hideSelectFeature:o,messages:r}=this,l=r.returnToInitialFeature??"",d=r?.selectFeature,h="showAllEnabled"in e?e.showAllEnabled:!1,f=e.flowType==="feature"||e.flowType==="feature-association"||e.flowType==="feature-relationship"&&!h,F=e.flowType!=="feature"&&f&&"isFeatureFromTable"in e&&!e.isFeatureFromTable&&!o,p=e.flowType==="feature"&&this.viewModel.aggregatedFeaturesEnabled?n`<div class="footer" slot=footer>${this._renderPagination(()=>{this._aggregatedFeaturesComponent.value?.previous()},()=>{this._aggregatedFeaturesComponent.value?.next()})}${this._renderFeaturePaginationText(this._aggregatedFeatureCount,this._selectedAggregatedFeatureIndex)}</div>`:null;return n`<calcite-flow-item .closable=${!i} .closed=${!s} .focusTrapEnabled=${this.focusTrapEnabled} class="flow-item-drill-in" .description=${b(this._getDrillInFlowItemDescription(e)??"")} .heading=${a?void 0:b(e.heading??"")} .selected=${t} @calciteFlowItemBack=${w=>{w.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${a?null:n`<div slot=heading><div .innerHTML=${M.sanitize(e.heading??"")??""}></div></div>`}<div slot=description><div .innerHTML=${M.sanitize(this._getDrillInFlowItemDescription(e)??"")??""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${l??""} title=${l??""??u}></calcite-action>${F?n`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${d??""} title=${d??u}></calcite-action>`:null}${f&&this._renderActionBar(e)||""}<div class="container">${e}</div>${p}</calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e.length>0,i=this.viewModel.aggregatedFeaturesEnabled&&this.viewModel.selectedFeature?.isAggregate&&!t,s=i&&e.length===0,a=e.length===0&&this._featureFlowItemSelected&&!i,o=e?.map((d,h)=>this._renderFlowItem(d,this._featureFlowItemSelected&&h===e.length-1)),r=this._renderBrowseAggregateContainer(!!s),l=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(a)]:[this._renderContentFeature(a),this._renderFeatureMenuContainer()];return n`<calcite-flow ${m(this._flowContainerNode)}>${l}${r}${o}</calcite-flow>`}_renderBrowseAggregateContainer(e){let{hideCloseButton:t,active:i,messages:s}=this,{selectedFeature:a}=this.viewModel,o=this.viewModel.aggregatedFeaturesEnabled&&a?.isAggregate,r=this._backLabel;return o?n`<calcite-flow-item .selected=${e} .closable=${!t} .closed=${!i} .focusTrapEnabled=${this.focusTrapEnabled} .description=${this._aggregatedFeatureCount?g(s.total??"",{total:this._aggregatedFeatureCount}):""} .heading=${s.aggregatedFeatures} @calciteFlowItemBack=${l=>{l.preventDefault(),this.viewModel.aggregatedFeaturesEnabled=!1}} .messageOverrides=${{back:r}} .loading=${this._aggregatedFeaturesLoading} @calciteFlowItemClose=${this._handleClose}><arcgis-aggregated-features .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .feature=${a??void 0} .flowItems=${this.flowItems} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map??void 0} .messageOverrides=${this.messageOverrides} .messages=${s} @arcgisPropertyChange=${this._handleAggregatedFeaturesPropertyChange} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.view??void 0} ${m(this._aggregatedFeaturesComponent)}></arcgis-aggregated-features><calcite-button appearance=transparent @click=${()=>this.viewModel.aggregatedFeaturesEnabled=!1} slot=footer-start scale=s width=full .label=${r} title=${r??u}>${s.back}</calcite-button></calcite-flow-item>`:null}_renderActionBar(e){let t=this.#e(e),i=!!t.length||this._hasActionsStartSlotContent||this._hasActionsEndSlotContent,s=this._isCollapsed||this.hideActionBar||!i;return n`<calcite-action-bar expand-toggle-disabled .expanded=${!this._hideActionText} scale=s slot=${(s?void 0:"action-bar")??u} .hidden=${s}><slot name=actions-start @slotchange=${this._handleActionsStartSlotChange}></slot><calcite-action-group overlay-positioning=fixed scale=s ${m(this._actionBarMenuNode)}>${this._renderActions(t,e)}</calcite-action-group><slot name=actions-end @slotchange=${this._handleActionsEndSlotChange}></slot></calcite-action-bar>`}_renderActions(e,t){return e.map(i=>{let s=this._getActionTitle(i,t),a=this._getActionLabel(i,t);return n`<calcite-action .active=${i.type==="toggle"?i.value:!1} .disabled=${i.disabled} .icon=${i.icon??void 0} .loading=${i.active} scale=s .textEnabled=${!this._hideActionText} .text=${s??""} .label=${a??s} title=${a??s??u} .hidden=${!i.visible} @click=${()=>this._triggerAction(i,t)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeature:t,includeDefaultActions:i,actions:s}=this.viewModel;return t?n`<arcgis-feature-next .actions=${s} .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .includeDefaultActions=${i} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} @arcgisPropertyChange=${()=>{this._selectedFeatureViewModel=this._selectedFeatureComponent.value?.viewModel}} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${m(this._selectedFeatureComponent)}></arcgis-feature-next>`:typeof e=="string"?D(e,n`<div .innerHTML=${M.sanitize(e)??""}></div>`):e??null}};N("arcgis-features-next",S);return S},"support/actions/ActionButton","core/Collection","popup/FeaturesModel","applications/Components/featureUtils","applications/Components/sanitizerUtils","applications/Components/stringUtils","intl","core/reactiveUtils","graphic/getGraphicOriginTitle",a,b,c,d,e,f,g,h,i)
2
+ import i from"./DSIYRWN2.js";import{a as L}from"./Y6WTYXVP.js";import"./FH3WFF5O.js";import h from"./W6ILOTBW.js";import{a as D}from"./YEPGUNSV.js";import g from"./DP2UXNPJ.js";import f from"./HU57LQOA.js";import e from"./3ZRVPLIZ.js";import{a as E}from"./WJQUE4DR.js";import{b as Z,c as U,d as j}from"./366GLQ5R.js";import d from"./ZRT4RJ62.js";import{a as z}from"./SAI7K4OO.js";import c from"./3VFPLRD3.js";import b from"./E3RBRDUV.js";import{f as H,h as B}from"./FY7P5YLX.js";import"./IRDDLVT2.js";import a from"./TJHVEY7T.js";import{a as I}from"./LXME6MU5.js";import{P as v,Q as m,R as O,T as A,X as u,Y as P,_ as N,a as R,b as n,o as C,x as $}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([J,W,Q,{initializeProjection:Y},{renderingSanitizer:M},{stripHTML:b},{substitute:g,formatNumber:y},{when:ee,watch:c},{getGraphicOriginTitle:te},,,,V,,,{e:T},{d:q},k])=>{var ie=R`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-border-color: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty,.content-hidden){padding:var(--arcgis-internal-padding-md, var(--calcite-space-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-space-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-space-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-space-2xs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-space-lg);width:var(--calcite-space-lg);height:var(--calcite-space-lg)}.action-image{flex:0 0 var(--calcite-space-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-space-lg);height:var(--calcite-space-lg)}.content-feature{--calcite-flow-item-footer-padding: 0;--calcite-flow-header-top-space: 0}.feature-menu-observer{flex:0 0 1px;height:1px;margin-block-start:-1px}.action-exit{transform:scaleX(-1)}.flow-item-drill-in{--calcite-flow-item-footer-padding: 0}.diagnostics-notice{padding:var(--calcite-space-md)}`;function se(_){return _?.declaredClass.startsWith("esri.layers.")??!1}function ae(_){if(!(!_||!("featureReduction"in _)))return _.featureReduction?.type}var ne=V(Q),oe=5,S=class extends O{constructor(){super(...arguments),this._zoomToFeature=new J({icon:"magnifying-glass-plus",id:"zoom-to-feature",title:"{messages.zoom}"}),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this._loadMoreFeatures()},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._setFocusAnimationFrameId=null,this._setFocusAnimationFrameResolve=null,this._rootFlowItemNode=v(),this._featureMenuViewportNode=v(),this._actionBarMenuNode=v(),this._flowContainerNode=v(),this._aggregatedFeaturesComponent=v(),this.messages=z(),this._selectedFeatureComponent=v(),this._actionFlowItems=new WeakSet,this._direction=H(),this._cancelOpenRelatedFeature=()=>{this._openRelatedFeatureAbortController=E(this._openRelatedFeatureAbortController)},this._spinnerVisible=!1,this._openRelatedFeatureAbortController=null,this.flowItems=new W,this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._hasActionsStartSlotContent=!1,this._hasActionsEndSlotContent=!1,this._selectedFeatureLoading=!1,this._lastSettledHeading="",this.viewModel=ne(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.focusTrapEnabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.diagnostics=this.viewModel.diagnostics,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.effectiveHeading=this.viewModel.effectiveHeading,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureItemAbilities=this.viewModel.featureItemAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new W,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSelectFeature=!1,this.hideSpinner=!1,this.hideContent=!1,this.chartAnimationDisabled=this.viewModel.featureItemAbilities?.chartAnimation,this.hideAttachmentsContent=this.viewModel.featureItemAbilities?.attachmentsContent,this.hideEmptyRelationshipContent=!1,this.hideCustomContent=this.viewModel.featureItemAbilities?.customContent,this.hideExpressionContent=!1,this.hideFieldsContent=this.viewModel.featureItemAbilities?.fieldsContent,this.hideMediaContent=this.viewModel.featureItemAbilities?.mediaContent,this.hideRelationshipContent=this.viewModel.featureItemAbilities?.relationshipContent,this.hideTextContent=this.viewModel.featureItemAbilities?.textContent,this.hideUtilityNetworkContent=this.viewModel.featureItemAbilities?.utilityNetworkAssociationsContent,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.open,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisClose=$(),this.arcgisPropertyChange=B()("active","collapsed","effectiveHeading","featureCount","featureMenuOpen","features","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=$(),this.arcgisTriggerAction=$()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_aggregatedFeatureCount:16,_selectedAggregatedFeatureIndex:16,_aggregatedFeaturesLoading:16,_hasActionsStartSlotContent:16,_hasActionsEndSlotContent:16,_selectedFeatureLoading:16,_lastSettledHeading:16,_selectedFeatureViewModel:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,_selectedFeatureHeading:16,_headingLabel:16,_backLabel:16,_selectedFeatureContent:16,_selectedFeaturePending:16,_featureFlowItemSelected:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,focusTrapEnabled:5,collapseDirection:1,collapsed:5,content:1,diagnostics:0,defaultPopupTemplateEnabled:5,effectiveHeading:32,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureItemAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSelectFeature:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideEmptyRelationshipContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=ie}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){let{selectedFeatureItem:e}=this.viewModel,t=this.heading||this._selectedFeatureHeading,i=this.content||this._selectedFeatureContent,s=e?.state==="error"||this._selectedFeatureViewModel?.state==="error";return this.showCollapseButton&&(this.initialDisplayMode==="list"||this._selectedFeaturePending||!s&&!t&&i==null&&e?.formattedAttributes==null||!!t&&!!i)}get _selectedFeatureHeading(){return this.viewModel.selectedFeatureItem?.heading}get _headingLabel(){let e=this._selectedFeatureHeading??this.heading;return e?b(e):void 0}get _backLabel(){let e=this._headingLabel,{messages:t}=this;return e?g(t.backLabel??"",{title:e}):t.back}get _selectedFeatureContent(){return this.viewModel.selectedFeatureItem?.content}get _selectedFeaturePending(){let{selectedFeature:e,selectedFeatureItem:t}=this.viewModel;if(!e)return!1;let i=this._selectedFeatureViewModel,s=i?.state;return t==null||t.waitingForContent||i?.graphic!==e||s!=="ready"&&s!=="error"}get _featureFlowItemSelected(){return this.initialDisplayMode==="list"?!!this.selectedFeature:!this.featureMenuOpen}clear(){this.viewModel.clear()}close(){this.open=!1}destroy(){return this._destroyPromise??=this._destroy()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let{signal:i}=t??{},s=new AbortController,{signal:a}=s,o=i?AbortSignal.any([a,i]):a;this._fetchFeaturesController=s,!e&&this.view&&this.location&&(await Y(this.location.spatialReference,this.view.spatialReference,null,{signal:o}),e=this.view.toScreen(this.location)??void 0),e&&await this.viewModel.fetchFeatures(e,{...t,signal:o})}next(){this.viewModel.next()}previous(){this.viewModel.previous()}async setFocus(){this._cancelSetFocusAnimationFrame(),await new Promise(e=>{this._setFocusAnimationFrameResolve=e,this._setFocusAnimationFrameId=requestAnimationFrame(()=>{this._setFocusAnimationFrameId=null;try{if(!this.isConnected||!this.viewModel?.active)return;this._flowContainerNode.value?.setFocus()}finally{this._resolveSetFocusAnimationFrame()}})})}connectedCallback(){super.connectedCallback(),this._createSpinner()}willUpdate(){let e=this._selectedFeaturePending,{effectiveHeading:t}=this.viewModel;(t||!e)&&(this._lastSettledHeading=t??"")}updated(){let e=this._selectedFeatureComponent.value??void 0;this.selectedFeatureComponent!==e&&(this._selectedFeatureViewModel=e?.viewModel,C(()=>this.selectedFeatureComponent=e)),this.componentOnReady().then(()=>{let t=this._featureMenuIntersectionObserverNode;this.isConnected&&t&&(this._featureMenuIntersectionObserver.unobserve(t),this._featureMenuIntersectionObserver.observe(t))})}loaded(){this.manager.onLifecycle(()=>[k({getLoading:()=>this.viewModel.waitingForResult,setEffectiveLoading:e=>{this._spinnerVisible=e,this._createSpinner()},timeout:25,minShownDuration:0}),k({getLoading:()=>this._selectedFeaturePending,setEffectiveLoading:e=>{this._selectedFeatureLoading=e}}),ee(()=>[this.initialDisplayMode==="list"&&!!this.viewModel?.selectedFeature,this.viewModel?.active],()=>this._setFocusIfTrapEnabled()),c(()=>[this.flowItems?.length,this.featureMenuOpen],()=>this._setFocusIfTrapEnabled()),c(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),c(()=>this.viewModel?.selectedFeature,()=>this._removeFlowItems()),c(()=>this.viewModel?.view?.scale,()=>this._viewScaleChange()),c(()=>this.viewModel?.view,(e,t)=>t&&this._viewChange()),c(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),c(()=>this.selectedFeatureComponent?.viewModel,(e,t)=>t&&this._removeFlowItems()),c(()=>[this.viewModel?.features.at(0),this.viewModel?.featureCount??0],([e,t],i)=>{let[s,a]=i??[void 0,0];(e!==s||t<a)&&this._featureMenuViewportScrollTop()}),c(()=>[this.featureMenuOpen,this.initialDisplayMode,this.open],()=>{this.viewModel.featureMenuOpen=this.featureMenuOpen,this.open&&(this.featureMenuOpen||this.initialDisplayMode==="list")&&(this.viewModel.featurePage=1)},{initial:!0}),c(()=>this.flowItems.toArray(),()=>this._handleFlowItemsChange(),{initial:!0}),c(()=>this.viewModel.aggregatedFeaturesEnabled,e=>{e||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._removeFlowItems())}),c(()=>this.referenceElement,(e,t)=>{this._removeSpinner(t),this._createSpinner()},{initial:!0}),c(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.pendingLocation,this.viewModel?.open],()=>this._createSpinner(),{initial:!0})])}disconnectedCallback(){super.disconnectedCallback(),this._selectedFeatureLoading=!1,this._spinnerVisible=!1,this._cancelSetFocusAnimationFrame(),this._removeSpinner(this.referenceElement)}async _destroy(){this._removeSpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._cancelSetFocusAnimationFrame(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect(),this._selectedFeatureViewModel=void 0,C(()=>this.selectedFeatureComponent=void 0),await this.manager.destroy()}_loadMoreFeatures(){let{viewModel:e}=this,{featurePage:t,featuresPerPage:i,features:s}=e;e.open&&(this.initialDisplayMode==="list"||this.featureMenuOpen)&&t!=null&&t*i<s.length&&(e.featurePage=t+1)}_setFocusIfTrapEnabled(){this.focusTrapEnabled&&this.setFocus()}_resolveSetFocusAnimationFrame(){let e=this._setFocusAnimationFrameResolve;this._setFocusAnimationFrameResolve=null,e?.()}_cancelSetFocusAnimationFrame(){this._setFocusAnimationFrameId!=null&&(cancelAnimationFrame(this._setFocusAnimationFrameId),this._setFocusAnimationFrameId=null),this._resolveSetFocusAnimationFrame()}_cancelFetchingFeatures(){this._fetchFeaturesController=E(this._fetchFeaturesController)}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{features:e,featurePage:t,featuresPerPage:i}=this.viewModel,s=new Map,a=Math.min((t??0)*i,e.length);for(let o=0;o<a;o++){let r=e[o],l=T(r),d=se(l)?l:null,h=s.get(d);h||(h=[],s.set(d,h)),h.push(o)}return s}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;if(this._openRelatedFeatureAbortController=t,await e.updateGeometry(),t.signal.aborted)return;let i=e.graphic,s=i?.geometry;if(s==null||i==null){this._openRelatedFeatureAbortController=null;return}if(this._removeFlowItems(),await this.viewModel.zoomTo({target:s}),t.signal.aborted)return;let{labelPointExecute:a}=await $arcgis.t(m=>m[0],"geometry/operators/labelPointOperator");if(t.signal.aborted)return;let o=a(s);o!=null&&(this.location=o),this.features=[i],this.open=!0,this._openRelatedFeatureAbortController=null}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?this.selectedFeatureIndex=-1:this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?this.selectedFeatureIndex=-1:this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"&&this._handleFeatureMenuBack()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){e!==this._featureMenuIntersectionObserverNode&&(this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserverNode=e??null)}_getActionLabel(e,t){if(e.id!=="zoom-to-feature")return null;let{messages:i}=this,s=t?.heading,a=t?s&&b(s):this._headingLabel;return a?g(i.zoomLabel??"",{messages:i,title:a}):i.zoom??""}_getActionTitle(e,t){let{messages:i}=this,s=t?t.graphic:this.selectedFeature,{id:a}=e,o=s?.attributes,r=e.title??"",l=a==="zoom-to-feature"?g(r,{messages:i}):a==="remove-selected-feature"?g(r,{messages:i}):a==="zoom-to-aggregated-features"?g(r,{messages:i}):a==="browse-aggregated-features"?g(r,{messages:i}):e.title;return l&&o?g(l,o):l??""}_onMainKeydown(e){let{key:t}=e;e.defaultPrevented||Z(e)||(j(t,this._direction,{horizontalOnly:!0})&&(e.preventDefault(),e.stopPropagation(),this._closeFeatureMenu(),this.previous()),U(t,this._direction,{horizontalOnly:!0})&&(e.preventDefault(),e.stopPropagation(),this._closeFeatureMenu(),this.next()))}_featureMenuViewportScrollTop(){this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:i,waitingForResult:s}=this.viewModel;s||!i||e===t||e===-1||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e,t=this.flowItems.getItemAt(this.flowItems.length-1)){if(e.disabled)return;e?.type==="toggle"&&(e.value=!e.value);let i=t&&"allActions"in t?t.viewModel:void 0;q(e,this.viewModel,i),this.arcgisTriggerAction.emit({action:e})}_viewScaleChange(){let{selectedFeature:e}=this,t=T(e);!e?.isAggregate||ae(t)!=="cluster"||(this.viewModel.aggregatedFeaturesEnabled=!1,this.open=!1,this.clear())}_viewChange(){this.viewModel.clear(),this.open=!1,this._aggregatedFeatureCount=0,this._removeFlowItems()}_handleAggregatedFeaturesPropertyChange({detail:e,target:t}){e.name==="aggregatedFeatureCount"&&(this._aggregatedFeatureCount=t.aggregatedFeatureCount),e.name==="selectedAggregatedFeatureIndex"&&(this._selectedAggregatedFeatureIndex=t.selectedAggregatedFeatureIndex,this._syncSelectedDrillInFeature()),e.name==="loading"&&(this._aggregatedFeaturesLoading=t.loading)}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_handleFlowItemsChange(){this._syncSelectedDrillInFeature(),this.flowItems.forEach(e=>{!("allActions"in e)||this._actionFlowItems.has(e)||(this._actionFlowItems.add(e),e.componentOnReady().then(()=>{this.isConnected&&this.flowItems.includes(e)&&this.requestUpdate()}))})}_syncSelectedDrillInFeature(){let e=this.flowItems.getItemAt(this.flowItems.length-1);C(()=>this.selectedDrillInFeature=e?.graphic??void 0)}_removeFlowItems(){this.viewModel.aggregatedFeaturesEnabled=!1,this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_getHeading(){if(this.hideHeading)return"";let{effectiveHeading:e}=this.viewModel;return e||!this._selectedFeaturePending?e??"":this._lastSettledHeading||(this._selectedFeatureLoading?this.messages.loading??"":"")}_handleActionsStartSlotChange(e){this._hasActionsStartSlotContent=L(e),this._updateSlottedActionTextEnabled(e.currentTarget)}_handleActionsEndSlotChange(e){this._hasActionsEndSlotContent=L(e),this._updateSlottedActionTextEnabled(e.currentTarget)}_updateSlottedActionTextEnabled(e){let t=!this._hideActionText;e.assignedElements({flatten:!0}).forEach(i=>{(i.matches("calcite-action")?[i]:i.querySelectorAll("calcite-action")).forEach(s=>s.textEnabled=t)})}_removeSpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl),this._spinnerEl=void 0}_createSpinner(){let e=this.referenceElement;e&&(this._removeSpinner(e),this._spinnerEl=P(n`<arcgis-spinner .label=${this.messages.loading??""} .trackLocation=${!this.hideSpinner&&this.viewModel.open&&this._spinnerVisible} .location=${this.viewModel?.pendingLocation??this.viewModel?.location??void 0} .referenceElement=${e} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}#e(e){let t=e&&"allActions"in e?e:void 0,{selectedFeatureItem:i}=this.viewModel;if(t&&!t.allActions)return[];let s=t?t.isFeatureFromTable:i?.isFeatureFromTable;return(t?.allActions??i?.allActions??(!e&&this.viewModel.includeDefaultActions?this.viewModel.defaultActions.concat(this.viewModel.actions):this.viewModel.actions)).toArray().filter(a=>!(e&&a.id==="browse-aggregated-features")&&!(s&&!this.location&&a.id===this._zoomToFeature.id))}render(){return n`<div class="root">${this._renderContentContainer()}</div>`}_renderFeatureNavigation(){return[this._renderPagination(()=>this._previousFeature(),()=>this._nextFeature()),this.initialDisplayMode==="list"?this._renderFeaturePaginationText(this.viewModel.featureCount,this.viewModel.selectedFeatureIndex):this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?n`<div slot=header-top class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(e,t){let{messages:i}=this;return n`<div class="pagination-text">${g(i.pageText??"",{index:y(t+1),total:y(e)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:i,streamingFeatures:s,selectedFeatureIndex:a}=t;return n`<calcite-action class="pagination-menu-button" icon=list .label=${e.showAllFeatures??""} .loading=${s} @click=${this._handlePaginationMenuButton} .text=${g(e.pageText??"",{index:y(a+1),total:y(i)})} text-enabled title=${e.showAllFeatures??""??u}></calcite-action>`}_renderPagination(e,t){let{previous:i,next:s}=this.messages;return n`<calcite-action-bar class="pagination-action-bar" expand-toggle-disabled layout=horizontal overflow-mode=none scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${i??""} @click=${e} .text=${i??""} title=${i??""??u}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${s??""} @click=${t} .text=${s??""} title=${s??""??u}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e){let{initialDisplayMode:t}=this,{featureModels:i,selectedFeatureIndex:s}=this.viewModel,a=i[e],o=a?.state==="ready"?a.heading:"",r=e===s;return n`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(e)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(e)} .selected=${r} @calciteListItemSelect=${()=>this._selectFeature(e)}><span .innerHTML=${(M.sanitize(o)||(a?.state==="loading"?this.messages.loading:this.messages.untitled))??""} slot=content></span>${t==="list"?n`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,i=this._groupResultsByLayer(),s=this.initialDisplayMode==="list"?"none":"single";return t.features.length?n`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${s}>${Array.from(i,([a,o])=>{let r=o.map(d=>this._renderFeatureMenuItem(d)),l=a?a.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&l!==null?D(a??"map-graphics",n`<calcite-list-item-group .heading=${l}>${r}</calcite-list-item-group>`):r})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?n`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??u}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(e){let{headingLevel:t,hideCloseButton:i,_isCollapsed:s,_collapseEnabled:a,featureNavigationTop:o,initialDisplayMode:r,selectedFeature:l,hideHeading:d}=this,{active:h,selectedFeatureItem:f,content:F}=this.viewModel,p=this._getHeading();if(r==="list"&&!l)return null;let w=!this._selectedFeaturePending&&(f?!f.content:!F);return n`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${A(I({"content-feature":!0,"flow-item-collapsed":s}))} .closable=${!i} .closed=${!h} .collapsed=${s} .collapseDirection=${this.collapseDirection??(o?"down":"up")} .collapsible=${a} .headingLevel=${t} .selected=${e} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController||this._selectedFeatureLoading} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} @keydown=${this._onMainKeydown} .heading=${!d&&p?b(p):void 0} ${m(this._rootFlowItemNode)}>${this._renderHeader()}${!d&&p?n`<span slot=heading><span .innerHTML=${M.sanitize(p??"")??""}></span></span>`:null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${A(I("container","content-container",{"content-hidden":w}))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderDiagnosticsRefineResults(){let{messages:e}=this,{view:t}=this.viewModel;return t!=null&&"effectiveMaxZoom"in t.constraints&&t.constraints.effectiveMaxZoom>=0&&t.zoom>=t.constraints.effectiveMaxZoom?e.maxRecordCountDescriptionRefineResultsMaxZoomLevel:e.maxRecordCountDescriptionRefineResults}_renderDiagnosticsList(e){let{messages:t}=this,i=Array.from(e,s=>te(s)??t.untitled);return i.length?n`<p>${t.maxRecordCountDescriptionWithLayerList}</p><ul>${i.map(s=>n`<li>${s}</li>`)}</ul><p>${this._renderDiagnosticsRefineResults()}</p>`:null}_renderDiagnosticsMultipleLayers(){let{messages:e}=this;return n`<p>${e.maxRecordCountDescriptionMultipleLayers}</p><p>${this._renderDiagnosticsRefineResults()}</p>`}_renderDiagnostics(){let{messages:e}=this,{diagnostics:t}=this.viewModel,i=t?.layerLimitExceeded;return i?.size?n`<calcite-notice class="diagnostics-notice" open kind=info scale=s><span slot=title>${e.maxRecordCountHeading}</span><div slot=message>${i.size<=oe?this._renderDiagnosticsList(i):this._renderDiagnosticsMultipleLayers()}</div></calcite-notice>`:null}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:i,messages:s,initialDisplayMode:a,featureMenuOpen:o,_featureFlowItemSelected:r,_collapseEnabled:l,_isCollapsed:d,featureNavigationTop:h,headingLevel:f}=this,{active:F,features:p,streamingFeatures:w}=e,G=i??s.selectFeature,x=this._backLabel;if(a==="feature"&&!o)return null;let K=!r;return n`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${A(I({"flow-item-collapsed":d}))} .closable=${!t} .closed=${!F} .collapsed=${a==="list"&&d} .collapseDirection=${this.collapseDirection??(h?"down":"up")} .collapsible=${a==="list"&&l} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand,back:x}} .description=${this.hideFeatureMenuHeading?void 0:g(s.total??"",{total:p.length})} .heading=${this.hideFeatureMenuHeading?void 0:G} .headingLevel=${f} .loading=${e.waitingForResult} .selected=${K} @calciteFlowItemBack=${X=>{X.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${m(this._featureMenuViewportNode)}>${a==="list"?this._renderHeaderActions():null}${w?n`<calcite-loader class="loader" inline .label=${s.loading??""} slot=header-actions-end></calcite-loader>`:null}${this._renderDiagnostics()}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" aria-hidden=true ${m(this._featureMenuIntersectionObserverCreated)}></div>${a==="feature"?n`<calcite-button scale=s appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full .label=${x} title=${x??u}>${s.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{hideCloseButton:i,active:s,hideHeading:a,hideSelectFeature:o,messages:r}=this,l=r.returnToInitialFeature??"",d=r?.selectFeature,h="showAllEnabled"in e?e.showAllEnabled:!1,f=e.flowType==="feature"||e.flowType==="feature-association"||e.flowType==="feature-relationship"&&!h,F=e.flowType!=="feature"&&f&&"isFeatureFromTable"in e&&!e.isFeatureFromTable&&!o,p=e.flowType==="feature"&&this.viewModel.aggregatedFeaturesEnabled?n`<div class="footer" slot=footer>${this._renderPagination(()=>{this._aggregatedFeaturesComponent.value?.previous()},()=>{this._aggregatedFeaturesComponent.value?.next()})}${this._renderFeaturePaginationText(this._aggregatedFeatureCount,this._selectedAggregatedFeatureIndex)}</div>`:null;return n`<calcite-flow-item .closable=${!i} .closed=${!s} .focusTrapEnabled=${this.focusTrapEnabled} class="flow-item-drill-in" .description=${b(this._getDrillInFlowItemDescription(e)??"")} .heading=${a?void 0:b(e.heading??"")} .selected=${t} @calciteFlowItemBack=${w=>{w.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${a?null:n`<div slot=heading><div .innerHTML=${M.sanitize(e.heading??"")??""}></div></div>`}<div slot=description><div .innerHTML=${M.sanitize(this._getDrillInFlowItemDescription(e)??"")??""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${l??""} title=${l??""??u}></calcite-action>${F?n`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${d??""} title=${d??u}></calcite-action>`:null}${f&&this._renderActionBar(e)||""}<div class="container">${e}</div>${p}</calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e.length>0,i=this.viewModel.aggregatedFeaturesEnabled&&this.viewModel.selectedFeature?.isAggregate&&!t,s=i&&e.length===0,a=e.length===0&&this._featureFlowItemSelected&&!i,o=e?.map((d,h)=>this._renderFlowItem(d,this._featureFlowItemSelected&&h===e.length-1)),r=this._renderBrowseAggregateContainer(!!s),l=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(a)]:[this._renderContentFeature(a),this._renderFeatureMenuContainer()];return n`<calcite-flow ${m(this._flowContainerNode)}>${l}${r}${o}</calcite-flow>`}_renderBrowseAggregateContainer(e){let{hideCloseButton:t,active:i,messages:s}=this,{selectedFeature:a}=this.viewModel,o=this.viewModel.aggregatedFeaturesEnabled&&a?.isAggregate,r=this._backLabel;return o?n`<calcite-flow-item .selected=${e} .closable=${!t} .closed=${!i} .focusTrapEnabled=${this.focusTrapEnabled} .description=${this._aggregatedFeatureCount?g(s.total??"",{total:this._aggregatedFeatureCount}):""} .heading=${s.aggregatedFeatures} @calciteFlowItemBack=${l=>{l.preventDefault(),this.viewModel.aggregatedFeaturesEnabled=!1}} .messageOverrides=${{back:r}} .loading=${this._aggregatedFeaturesLoading} @calciteFlowItemClose=${this._handleClose}><arcgis-aggregated-features .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .feature=${a??void 0} .flowItems=${this.flowItems} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map??void 0} .messageOverrides=${this.messageOverrides} .messages=${s} @arcgisPropertyChange=${this._handleAggregatedFeaturesPropertyChange} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.view??void 0} ${m(this._aggregatedFeaturesComponent)}></arcgis-aggregated-features><calcite-button appearance=transparent @click=${()=>this.viewModel.aggregatedFeaturesEnabled=!1} slot=footer-start scale=s width=full .label=${r} title=${r??u}>${s.back}</calcite-button></calcite-flow-item>`:null}_renderActionBar(e){let t=this.#e(e),i=!!t.length||this._hasActionsStartSlotContent||this._hasActionsEndSlotContent,s=this._isCollapsed||this.hideActionBar||!i;return n`<calcite-action-bar expand-toggle-disabled .expanded=${!this._hideActionText} scale=s slot=${(s?void 0:"action-bar")??u} .hidden=${s}><slot name=actions-start @slotchange=${this._handleActionsStartSlotChange}></slot><calcite-action-group overlay-positioning=fixed scale=s ${m(this._actionBarMenuNode)}>${this._renderActions(t,e)}</calcite-action-group><slot name=actions-end @slotchange=${this._handleActionsEndSlotChange}></slot></calcite-action-bar>`}_renderActions(e,t){return e.map(i=>{let s=this._getActionTitle(i,t),a=this._getActionLabel(i,t);return n`<calcite-action .active=${i.type==="toggle"?i.value:!1} .disabled=${i.disabled} .icon=${i.icon??void 0} .loading=${i.active} scale=s .textEnabled=${!this._hideActionText} .text=${s??""} .label=${a??s} title=${a??s??u} .hidden=${!i.visible} @click=${()=>this._triggerAction(i,t)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeature:t,includeDefaultActions:i,actions:s}=this.viewModel;return t?n`<arcgis-feature-next .actions=${s} .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .includeDefaultActions=${i} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} @arcgisPropertyChange=${()=>{this._selectedFeatureViewModel=this._selectedFeatureComponent.value?.viewModel}} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${m(this._selectedFeatureComponent)}></arcgis-feature-next>`:typeof e=="string"?D(e,n`<div .innerHTML=${M.sanitize(e)??""}></div>`):e??null}};N("arcgis-features-next",S);return S},"support/actions/ActionButton","core/Collection","popup/FeaturesModel","applications/Components/featureUtils","applications/Components/sanitizerUtils","applications/Components/stringUtils","intl","core/reactiveUtils","graphic/getGraphicOriginTitle",a,b,c,d,e,f,g,h,i)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import h from"./LZUAJU6O.js";import g from"./SKV3CQSZ.js";import"./WJQUE4DR.js";import{a as $}from"./NN4HL3RN.js";import e from"./ZRT4RJ62.js";import{a as k}from"./SAI7K4OO.js";import{a as p}from"./L5IRXOCJ.js";import d from"./3VFPLRD3.js";import c from"./E3RBRDUV.js";import{h as _}from"./FY7P5YLX.js";import"./IRDDLVT2.js";import a from"./TJHVEY7T.js";import"./LXME6MU5.js";import{R as m,T as b,X as y,_ as w,a as f,b as r,x}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{ignoreAbortErrors:S},{watch:V},D,{property:d,subclass:G},,,,L,,z])=>{var A=f`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-space-lg);--arcgis-internal-panel-actions-gap: var(--calcite-space-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{width:var(--arcgis-internal-panel-width, 300px);max-width:100%}.root{min-width:var(--arcgis-internal-panel-min-width);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}.container{display:flex;--layer-item-background: var(--calcite-color-surface-3);flex-direction:column;flex-shrink:0;flex-basis:auto;justify-content:space-between;gap:var(--arcgis-internal-panel-gap)}.error{color:var(--calcite-color-status-danger)}.container,.hint{display:flex;flex-direction:column;gap:var(--arcgis-internal-panel-gap)}.error,.hint{overflow:hidden;animation:arcgis-slice-fade-in .25s ease-in-out}.error p,.hint p{margin:0;padding:0}.hint:not(:has(*)){display:none}.layer-item{--calcite-color-surface-3: var(--layer-item-background);--calcite-color-foreground-1: var(--layer-item-background)}.actions{display:flex;flex-flow:column;gap:var(--arcgis-internal-panel-actions-gap);justify-content:center}.actions:not(:has(*)){display:none}@keyframes arcgis-slice-fade-in{0%{opacity:0}25%{opacity:0}to{opacity:1}}`,j=Object.defineProperty,T=Object.getOwnPropertyDescriptor,s=(e,i,t,n)=>{for(var a=n>1?void 0:n?T(i,t):i,l=e.length-1,c;l>=0;l--)(c=e[l])&&(a=(n?c(i,t,a):c(a))||a);return n&&a&&j(i,t,a),a},u=new Set,o=class extends z{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="SliceViewModel is only supported in 3D views."}async pickLayerToExclude(){if(this.interactionDisabled)return;let e=this.analysisView;if(e){let i=super.start({operation:t=>e.pickLayerToExclude(t),clear:!1});this._excludingLayers=i;try{await S(i)}finally{this._excludingLayers===i&&(this._excludingLayers=void 0)}}}async place(e){await this.analysisView?.place(e)}clearAnalysis(){this.analysis.shape=null}initialize(){u.add(this)}destroy(){u.delete(this)}get state(){return this.disabled||!this.ready?"disabled":this._excludingLayers?"excludingLayer":this.operationState==="active"?"slicing":this.analysis.valid?"sliced":"ready"}get shape(){return this.analysis.shape}set shape(e){this.analysis.shape=e}get tiltEnabled(){return this.analysis.tiltEnabled}set tiltEnabled(e){this.analysis.tiltEnabled=e}get excludedLayers(){return this.analysis.excludedLayers}set excludedLayers(e){this.analysis.excludedLayers=e}get excludeGroundSurface(){return this.analysis.excludeGroundSurface}set excludeGroundSurface(e){this.analysis.excludeGroundSurface=e}async start(){this.interactionDisabled||(u.forEach(e=>{e.view===this.view&&e!==this&&e.clear()}),await super.start())}onConnectToAnalysisView(e){e.active=!0}constructAnalysis(){return new D}};s([d()],o.prototype,"_excludingLayers",2);s([d({readOnly:!0})],o.prototype,"state",1);s([d()],o.prototype,"shape",1);s([d()],o.prototype,"tiltEnabled",1);s([d()],o.prototype,"excludedLayers",1);s([d()],o.prototype,"excludeGroundSurface",1);o=s([G("esri.components.Slice.SliceViewModel")],o);var O=o,H=L(O),h=class extends m{constructor(){super(...arguments),this.viewModel=H(this),this._messages=k(),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.excludeGroundSurface=this.viewModel.excludeGroundSurface,this.excludedLayers=this.viewModel.excludedLayers,this.headingLevel=3,this.hideStartButton=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="slice",this.interactionDisabled=this.viewModel.interactionDisabled,this.shape=this.viewModel.shape,this.state=this.viewModel.state,this.tiltEnabled=this.viewModel.tiltEnabled,this.arcgisPropertyChange=_()("analysis","interactionDisabled","state"),this.arcgisReady=x()}static{this.properties={_hasVoxelLayers:16,view:0,analysis:0,autoDestroyDisabled:5,excludeGroundSurface:5,excludedLayers:0,headingLevel:9,hideStartButton:5,hideVisualization:5,icon:3,interactionDisabled:5,label:1,messageOverrides:0,referenceElement:1,shape:0,state:32,tiltEnabled:5}}static{this.styles=A}get _hasVoxelLayers(){let i=this.viewModel?.view;return i!=null?i.allLayerViews.some(t=>t.type==="voxel-3d"):!1}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){S(this.viewModel.start())}load(){this.manager.onLifecycle(()=>[V(()=>this._renderContainerNode(),()=>this.requestUpdate())])}render(){return r`<div class=${b({root:!0,[p.widget]:!0,[p.panel]:!0})} role=presentation>${this._renderContainerNode()}</div>`}_renderContainerNode(){let i=this._messages,{state:t,hideVisualization:n,supported:a}=this.viewModel,l=t==="slicing"||t==="excludingLayer";if(n||!a)return null;a||r`<div class="container"><div class="error"><p>${this._messages.unsupported}</p></div></div>`;let{excludedLayers:c}=this.viewModel,v=this.excludeGroundSurface,E=c.length>0||v,g=t==="disabled";return r`<div class="container"><div class="hint">${t==="excludingLayer"?r`<p class="hint-text">${i.excludeHint}</p>`:null}${t==="slicing"?r`<p class="hint-text">${this._hasVoxelLayers?i.voxelHint:i.hint}</p><p class="hint-text">${i.verticalHint}</p>`:null}</div>${!l&&E?r`<div class="layer-list">${$({class:"layer-list-title",level:this.headingLevel,children:i.excludedLayers})}${B({layers:c.toArray(),excludeGroundSurface:v,onLayerClick:C=>{this.excludedLayers.remove(C)},onGroundClick:()=>{this.excludeGroundSurface=!1},listLabel:i.excludedLayers,layerActionLabel:i.includeLayer,groundItemTitle:i.ground})}</div>`:null}<div class="actions">${!l&&!this.hideStartButton?r`<calcite-button class="new-slice-button" .disabled=${g||this.interactionDisabled} @click=${this.start}>${i.newSlice}</calcite-button>`:null}${t==="sliced"?r`<calcite-button appearance=outline-fill class="exclude-button" .disabled=${g||this.interactionDisabled} @click=${()=>this.viewModel.pickLayerToExclude()}>${i.excludeLayer}</calcite-button>`:null}${t==="excludingLayer"?r`<calcite-button appearance=outline-fill class="cancel-button" .disabled=${g} @click=${()=>this.viewModel.stop()}>${i.cancel}</calcite-button>`:null}</div></div>`}};function M(e){return r`<calcite-list-item class="layer-item" data-testid=${`list-item-${e.uid}`} .label=${e.title??""}><calcite-action icon=x @click=${e.onClick} slot=actions-end .text=${e.actionLabel} title=${e.actionLabel??y}></calcite-action></calcite-list-item>`}function B(e){let i=e.layers.map(t=>M({uid:t.uid,title:t.title??"",onClick:()=>e.onLayerClick(t),actionLabel:e.layerActionLabel}));return e.excludeGroundSurface&&i.push(M({uid:"ground",title:e.groundItemTitle,onClick:e.onGroundClick,actionLabel:e.layerActionLabel})),r`<calcite-list .label=${e.listLabel} selection-mode=none>${i}</calcite-list>`}w("arcgis-slice",h);return h},"core/promiseUtils","core/reactiveUtils","analysis/SliceAnalysis","core/accessorSupport/decorators",a,c,d,e,g,h)
2
+ import h from"./BQCOYIEH.js";import g from"./3ZRVPLIZ.js";import"./WJQUE4DR.js";import{a as $}from"./NN4HL3RN.js";import e from"./ZRT4RJ62.js";import{a as k}from"./SAI7K4OO.js";import{a as p}from"./L5IRXOCJ.js";import d from"./3VFPLRD3.js";import c from"./E3RBRDUV.js";import{h as _}from"./FY7P5YLX.js";import"./IRDDLVT2.js";import a from"./TJHVEY7T.js";import"./LXME6MU5.js";import{R as m,T as b,X as y,_ as w,a as f,b as r,x}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{ignoreAbortErrors:S},{watch:V},D,{property:d,subclass:G},,,,L,,z])=>{var A=f`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-space-lg);--arcgis-internal-panel-actions-gap: var(--calcite-space-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{width:var(--arcgis-internal-panel-width, 300px);max-width:100%}.root{min-width:var(--arcgis-internal-panel-min-width);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}.container{display:flex;--layer-item-background: var(--calcite-color-surface-3);flex-direction:column;flex-shrink:0;flex-basis:auto;justify-content:space-between;gap:var(--arcgis-internal-panel-gap)}.error{color:var(--calcite-color-status-danger)}.container,.hint{display:flex;flex-direction:column;gap:var(--arcgis-internal-panel-gap)}.error,.hint{overflow:hidden;animation:arcgis-slice-fade-in .25s ease-in-out}.error p,.hint p{margin:0;padding:0}.hint:not(:has(*)){display:none}.layer-item{--calcite-color-surface-3: var(--layer-item-background);--calcite-color-foreground-1: var(--layer-item-background)}.actions{display:flex;flex-flow:column;gap:var(--arcgis-internal-panel-actions-gap);justify-content:center}.actions:not(:has(*)){display:none}@keyframes arcgis-slice-fade-in{0%{opacity:0}25%{opacity:0}to{opacity:1}}`,j=Object.defineProperty,T=Object.getOwnPropertyDescriptor,s=(e,i,t,n)=>{for(var a=n>1?void 0:n?T(i,t):i,l=e.length-1,c;l>=0;l--)(c=e[l])&&(a=(n?c(i,t,a):c(a))||a);return n&&a&&j(i,t,a),a},u=new Set,o=class extends z{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="SliceViewModel is only supported in 3D views."}async pickLayerToExclude(){if(this.interactionDisabled)return;let e=this.analysisView;if(e){let i=super.start({operation:t=>e.pickLayerToExclude(t),clear:!1});this._excludingLayers=i;try{await S(i)}finally{this._excludingLayers===i&&(this._excludingLayers=void 0)}}}async place(e){await this.analysisView?.place(e)}clearAnalysis(){this.analysis.shape=null}initialize(){u.add(this)}destroy(){u.delete(this)}get state(){return this.disabled||!this.ready?"disabled":this._excludingLayers?"excludingLayer":this.operationState==="active"?"slicing":this.analysis.valid?"sliced":"ready"}get shape(){return this.analysis.shape}set shape(e){this.analysis.shape=e}get tiltEnabled(){return this.analysis.tiltEnabled}set tiltEnabled(e){this.analysis.tiltEnabled=e}get excludedLayers(){return this.analysis.excludedLayers}set excludedLayers(e){this.analysis.excludedLayers=e}get excludeGroundSurface(){return this.analysis.excludeGroundSurface}set excludeGroundSurface(e){this.analysis.excludeGroundSurface=e}async start(){this.interactionDisabled||(u.forEach(e=>{e.view===this.view&&e!==this&&e.clear()}),await super.start())}onConnectToAnalysisView(e){e.active=!0}constructAnalysis(){return new D}};s([d()],o.prototype,"_excludingLayers",2);s([d({readOnly:!0})],o.prototype,"state",1);s([d()],o.prototype,"shape",1);s([d()],o.prototype,"tiltEnabled",1);s([d()],o.prototype,"excludedLayers",1);s([d()],o.prototype,"excludeGroundSurface",1);o=s([G("esri.components.Slice.SliceViewModel")],o);var O=o,H=L(O),h=class extends m{constructor(){super(...arguments),this.viewModel=H(this),this._messages=k(),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.excludeGroundSurface=this.viewModel.excludeGroundSurface,this.excludedLayers=this.viewModel.excludedLayers,this.headingLevel=3,this.hideStartButton=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="slice",this.interactionDisabled=this.viewModel.interactionDisabled,this.shape=this.viewModel.shape,this.state=this.viewModel.state,this.tiltEnabled=this.viewModel.tiltEnabled,this.arcgisPropertyChange=_()("analysis","interactionDisabled","state"),this.arcgisReady=x()}static{this.properties={_hasVoxelLayers:16,view:0,analysis:0,autoDestroyDisabled:5,excludeGroundSurface:5,excludedLayers:0,headingLevel:9,hideStartButton:5,hideVisualization:5,icon:3,interactionDisabled:5,label:1,messageOverrides:0,referenceElement:1,shape:0,state:32,tiltEnabled:5}}static{this.styles=A}get _hasVoxelLayers(){let i=this.viewModel?.view;return i!=null?i.allLayerViews.some(t=>t.type==="voxel-3d"):!1}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){S(this.viewModel.start())}load(){this.manager.onLifecycle(()=>[V(()=>this._renderContainerNode(),()=>this.requestUpdate())])}render(){return r`<div class=${b({root:!0,[p.widget]:!0,[p.panel]:!0})} role=presentation>${this._renderContainerNode()}</div>`}_renderContainerNode(){let i=this._messages,{state:t,hideVisualization:n,supported:a}=this.viewModel,l=t==="slicing"||t==="excludingLayer";if(n||!a)return null;a||r`<div class="container"><div class="error"><p>${this._messages.unsupported}</p></div></div>`;let{excludedLayers:c}=this.viewModel,v=this.excludeGroundSurface,E=c.length>0||v,g=t==="disabled";return r`<div class="container"><div class="hint">${t==="excludingLayer"?r`<p class="hint-text">${i.excludeHint}</p>`:null}${t==="slicing"?r`<p class="hint-text">${this._hasVoxelLayers?i.voxelHint:i.hint}</p><p class="hint-text">${i.verticalHint}</p>`:null}</div>${!l&&E?r`<div class="layer-list">${$({class:"layer-list-title",level:this.headingLevel,children:i.excludedLayers})}${B({layers:c.toArray(),excludeGroundSurface:v,onLayerClick:C=>{this.excludedLayers.remove(C)},onGroundClick:()=>{this.excludeGroundSurface=!1},listLabel:i.excludedLayers,layerActionLabel:i.includeLayer,groundItemTitle:i.ground})}</div>`:null}<div class="actions">${!l&&!this.hideStartButton?r`<calcite-button class="new-slice-button" .disabled=${g||this.interactionDisabled} @click=${this.start}>${i.newSlice}</calcite-button>`:null}${t==="sliced"?r`<calcite-button appearance=outline-fill class="exclude-button" .disabled=${g||this.interactionDisabled} @click=${()=>this.viewModel.pickLayerToExclude()}>${i.excludeLayer}</calcite-button>`:null}${t==="excludingLayer"?r`<calcite-button appearance=outline-fill class="cancel-button" .disabled=${g} @click=${()=>this.viewModel.stop()}>${i.cancel}</calcite-button>`:null}</div></div>`}};function M(e){return r`<calcite-list-item class="layer-item" data-testid=${`list-item-${e.uid}`} .label=${e.title??""}><calcite-action icon=x @click=${e.onClick} slot=actions-end .text=${e.actionLabel} title=${e.actionLabel??y}></calcite-action></calcite-list-item>`}function B(e){let i=e.layers.map(t=>M({uid:t.uid,title:t.title??"",onClick:()=>e.onLayerClick(t),actionLabel:e.layerActionLabel}));return e.excludeGroundSurface&&i.push(M({uid:"ground",title:e.groundItemTitle,onClick:e.onGroundClick,actionLabel:e.layerActionLabel})),r`<calcite-list .label=${e.listLabel} selection-mode=none>${i}</calcite-list>`}w("arcgis-slice",h);return h},"core/promiseUtils","core/reactiveUtils","analysis/SliceAnalysis","core/accessorSupport/decorators",a,c,d,e,g,h)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as w}from"./Y6WTYXVP.js";import{a as V}from"./FH3WFF5O.js";import h from"./BQCOYIEH.js";import{d as _,k as y}from"./FXUZU52U.js";import f from"./3ZRVPLIZ.js";import{a as D}from"./WJQUE4DR.js";import e from"./ZRT4RJ62.js";import{a as z}from"./SAI7K4OO.js";import{a as u}from"./L5IRXOCJ.js";import c from"./3VFPLRD3.js";import b from"./E3RBRDUV.js";import{f as B,h as O}from"./FY7P5YLX.js";import"./IRDDLVT2.js";import a from"./TJHVEY7T.js";import"./LXME6MU5.js";import{Q as U,R as k,T as v,X as g,_ as M,a as C,b as d,x as S}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{createChart:A},{signal:L},{ignoreAbortErrors:b},{watch:m},R,{property:a,subclass:I},,,,E,{b:$,d:f},P])=>{var T=C`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{--internal-chart-height: 180px;--internal-gap: var(--calcite-space-sm-plus);width:550px;isolation:isolate;position:relative;container-type:inline-size}.root{display:flex;flex-direction:column;width:100%;min-width:0;gap:var(--internal-gap)}.header{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;margin-bottom:calc(var(--internal-gap) * -1)}.actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--calcite-space-xs)}.action-button{width:auto;min-height:32px}.main-container{display:flex;position:relative;flex-flow:column;width:100%;height:var(--internal-chart-height)}.chart-container{position:relative;width:100%;height:100%}.prompt-container{box-sizing:border-box;display:grid;place-content:center;padding-inline:var(--calcite-space-md);height:100%;text-align:center}.prompt-message{margin:0;width:100%}.spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:opacity .15s ease-in-out;transition-delay:0;opacity:0;&.visible{transition-delay:50ms;opacity:1}&.small{inset-inline-start:0;inset-block-start:-24px;left:unset;transform:none;color:var(--calcite-color-brand)}}@container (max-width: 400px){.esri-widget--panel{height:auto}.actions{flex-direction:column}.action-button{align-self:stretch}}`;async function H(t,e,i){let s=await Z(t,e);return $(i),j(s)?s.highlight(e):V()}async function Z(t,e){let i=e?.layer;if(!(!i||i.type==="subtype-sublayer"||i.type==="sublayer"||i.type==="building-component"))return await t.whenLayerView(i)}function j(t){return t!=null&&"highlight"in t&&typeof t.highlight=="function"}function G({geometry:t}){return t?.type==="polyline"&&t.paths.length>0&&t.paths.every(e=>e.length>=2)}function q({geometry:t}){return t?.type==="polyline"&&t.paths.reduce((e,i)=>e+i.length,0)>0}function J(t){return t?.samples?.some(e=>e.z!=null)??!1}var K=Object.defineProperty,N=Object.getOwnPropertyDescriptor,o=(t,e,i,s)=>{for(var r=s>1?void 0:s?N(e,i):e,l=t.length-1,c;l>=0;l--)(c=t[l])&&(r=(s?c(e,i,r):c(r))||r);return s&&r&&K(e,i,r),r},n=class extends P{constructor(){super(...arguments),this._resettingUnits=!1,this.highlightDisabled=!1,this.uniformChartScaling=!1,this.shouldForceInteractive=!1,this.supportedViewType="both",this.unsupportedErrorMessage=""}get _hasSamples(){let{progress:t}=this;return!!this.analysisView?.results?.some(e=>e.available&&(t<1||J(e)))}get doneButtonAvailable(){return this.featureIsSelected?!1:this.analysisView?.canStopPlacing??!1}get effectiveDisplayUnits(){return this.analysisView?.effectiveDisplayUnits}get errorState(){if(!G(this.analysis))return"no-valid-input";let t=this.analysisView?.error;if(t)switch(t.name){case"too-complex":return"too-complex";case"elevation-query-error":return"no-valid-input";default:return"unknown"}return this._hasSamples?"none":"no-available-profiles"}get feature(){return this._selectedFeature}set feature(t){t?t!==this.feature&&(this.analysis.setGeometryFromFeature(t),this._selectedFeature=t):this._selectedFeature=void 0}get featureIsSelected(){return this.feature!=null}get hasVertices(){return q(this.analysis)}get indicatorRelativePosition(){return this.analysisView?.indicatorRelativePosition??void 0}get geometry(){return this.analysis.geometry}set geometry(t){this.analysis.geometry=t}get elevationInfo(){return this.analysis.elevationInfo}set elevationInfo(t){this.analysis.elevationInfo=t}get profiles(){return this.analysis.profiles}set profiles(t){this.analysis.profiles=t}get progress(){return this.analysisView?.progress??0}get results(){return this.analysisView?.results??[]}get selectButtonAvailable(){for(let t of this.view?.map?.allLayers.toArray()??[])if(t.type==="graphics"&&!("internal"in t&&t.internal)&&t.graphics.some(e=>e.geometry?.type==="polyline")||"geometryType"in t&&t.geometryType==="polyline")return!0;return!!this.view?.graphics?.some(t=>t.geometry?.type==="polyline")}get state(){return this.disabled||!this.ready?"disabled":this._selectingPromise?"selecting":this.operationState==="active"?"creating":this.analysis.valid?this.featureIsSelected?"selected":"created":"ready"}get distanceUnit(){return y({userUnit:this._userDistanceUnit,analysisUnit:this.analysis.displayUnits?.distance,options:this.distanceUnitOptions,defaultUnit:this.defaultMeasurementSystem,viewUnit:this.view?.options.displayUnits.length})}set distanceUnit(t){this._userDistanceUnit=t}get distanceUnitOptions(){return F(this._userDistanceUnitOptions)}set distanceUnitOptions(t){this._userDistanceUnitOptions=t}get elevationUnit(){return y({userUnit:this._userElevationUnit,analysisUnit:this.analysis.displayUnits?.elevation,options:this.elevationUnitOptions,defaultUnit:this.defaultMeasurementSystem,viewUnit:this.view?.options.displayUnits.verticalLength})}set elevationUnit(t){this._userElevationUnit=t}get elevationUnitOptions(){return F(this._userElevationUnitOptions)}set elevationUnitOptions(t){this._userElevationUnitOptions=t}get canResetDistanceUnit(){return this._userDistanceUnit!=null||this.analysis.displayUnits.distance!=null}get canResetElevationUnit(){return this._userElevationUnit!=null||this.analysis.displayUnits.elevation!=null}resetUnit(t){this._resettingUnits=!0;try{t==="distance"?this._userDistanceUnit=void 0:this._userElevationUnit=void 0,this.analysis.displayUnits[t]=null}finally{this._resettingUnits=!1}}initialize(){this.addHandles([m(()=>({analysis:this.analysis,unitDistance:this._userDistanceUnit,unitElevation:this._userElevationUnit}),({analysis:t,unitDistance:e,unitElevation:i})=>{this._resettingUnits||(i&&(t.displayUnits.elevation=i),e&&(t.displayUnits.distance=e))},{sync:!0,initial:!0}),m(()=>({selectedFeature:this.feature,profiles:this.analysis.profiles.toArray()}),({selectedFeature:t,profiles:e},i)=>{this._highlightSelectedFeature(this.highlightDisabled?void 0:t),this.analysis.viewOptions.geometryVisualizationVisible=!this.highlightDisabled&&t==null;let s=i?.selectedFeature;e.forEach(r=>{switch(r.type){case"scene":this._excludeSelectedFeatureFromProfile(r,t,s);break;case"input":r.chartOptions.lineVisible=t!=null,r.viewOptions.lineVisible=t!=null;break}})},{initial:!0})])}destroy(){this._removeSelectionHighlight()}async select(){if(this.interactionDisabled)return;let t=this.analysisView;if(!t)return;this.clear();let e=super.start({operation:async i=>{let s=await t.pickFeature(i);i?.signal?.aborted||(t.interactive=!1,this.feature=s.feature)},clear:!1});this._selectingPromise=e;try{await b(e)}finally{this._selectingPromise===e&&(this._selectingPromise=void 0)}}async place(t){await this.analysisView?.place(t)}clearAnalysis(){this.geometry=null,this.elevationInfo=null,this.feature=void 0}constructAnalysis(){return new R}_highlightSelectedFeature(t){this._removeSelectionHighlight();let e=this.view;!e||!t||(this._selectionHighlightTask=f(async i=>await H(e,t,{signal:i})))}_removeSelectionHighlight(){this._selectionHighlightTask?.value?.remove(),this._selectionHighlightTask=D(this._selectionHighlightTask)}_excludeSelectedFeatureFromProfile(t,e,i){let s=new Set(t.exclude??[]);i&&s.delete(i),e&&s.add(e),t.exclude=Array.from(s)}};o([a()],n.prototype,"_userDistanceUnit",2);o([a()],n.prototype,"_userDistanceUnitOptions",2);o([a()],n.prototype,"_userElevationUnit",2);o([a()],n.prototype,"_userElevationUnitOptions",2);o([a()],n.prototype,"_selectingPromise",2);o([a()],n.prototype,"_selectedFeature",2);o([a()],n.prototype,"_selectionHighlightTask",2);o([a()],n.prototype,"_hasSamples",1);o([a()],n.prototype,"doneButtonAvailable",1);o([a({readOnly:!0})],n.prototype,"effectiveDisplayUnits",1);o([a({readOnly:!0})],n.prototype,"errorState",1);o([a()],n.prototype,"feature",1);o([a()],n.prototype,"featureIsSelected",1);o([a({readOnly:!0})],n.prototype,"hasVertices",1);o([a()],n.prototype,"highlightDisabled",2);o([a()],n.prototype,"indicatorRelativePosition",1);o([a()],n.prototype,"geometry",1);o([a()],n.prototype,"elevationInfo",1);o([a()],n.prototype,"profiles",1);o([a({readOnly:!0})],n.prototype,"progress",1);o([a({readOnly:!0})],n.prototype,"results",1);o([a({readOnly:!0})],n.prototype,"selectButtonAvailable",1);o([a({readOnly:!0})],n.prototype,"state",1);o([a()],n.prototype,"uniformChartScaling",2);o([a()],n.prototype,"distanceUnit",1);o([a()],n.prototype,"distanceUnitOptions",1);o([a()],n.prototype,"elevationUnit",1);o([a()],n.prototype,"elevationUnitOptions",1);o([a({readOnly:!0})],n.prototype,"canResetDistanceUnit",1);o([a({readOnly:!0})],n.prototype,"canResetElevationUnit",1);n=o([I("components.elevation-profile.ElevationProfileViewModel")],n);function F(t){let e=t?.filter(i=>_.includes(i));return e&&e.length>0?e:_.slice()}var W=E(n),x=class extends k{constructor(){super(...arguments),this.viewModel=W(this),this._direction=B(),this._chartInitializationTask=L(void 0),this._hideZoomOutButton=!0,this._hasSettingsStartContent=!1,this._hasSettingsEndContent=!1,this.analysis=this.viewModel.analysis,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.effectiveDisplayUnits=this.viewModel.effectiveDisplayUnits,this.feature=this.viewModel.feature,this.hideChart=!1,this.hideChartGridLines=!1,this.hideChartAxisLabels=!1,this.hideClearButton=!1,this.hideLegend=!1,this.hideSelectButton=!1,this.hideSettingsButton=!1,this.hideResetUnitsButton=!1,this.hideStartButton=!1,this.hideUniformChartScalingToggle=!1,this.hideDistanceDisplayUnitSelect=!1,this.hideElevationDisplayUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.highlightDisabled=this.viewModel.highlightDisabled,this.icon="altitude",this.indicatorRelativePosition=this.viewModel.indicatorRelativePosition,this.interactionDisabled=this.viewModel.interactionDisabled,this.geometry=this.viewModel.geometry,this.elevationInfo=this.viewModel.elevationInfo,this._messages=z(),this.profiles=this.viewModel.profiles,this.progress=this.viewModel.progress,this.state=this.viewModel.state,this.uniformChartScaling=this.viewModel.uniformChartScaling,this.distanceUnit=this.viewModel.distanceUnit,this.distanceUnitOptions=this.viewModel.distanceUnitOptions,this.elevationUnit=this.viewModel.elevationUnit,this.elevationUnitOptions=this.viewModel.elevationUnitOptions,this.arcgisPropertyChange=O()("analysis","effectiveDisplayUnits","elevationInfo","feature","geometry","indicatorRelativePosition","interactionDisabled","progress","state"),this.arcgisReady=S()}static{this.properties={_hideZoomOutButton:16,_chartContainer:16,_hasSettingsStartContent:16,_hasSettingsEndContent:16,analysis:0,view:0,autoDestroyDisabled:5,effectiveDisplayUnits:32,feature:0,hideChart:5,hideChartGridLines:5,hideChartAxisLabels:5,hideClearButton:5,hideLegend:5,hideSelectButton:5,hideSettingsButton:5,hideResetUnitsButton:5,hideStartButton:5,hideUniformChartScalingToggle:5,hideDistanceDisplayUnitSelect:5,hideElevationDisplayUnitSelect:5,hideVisualization:5,highlightDisabled:5,icon:3,indicatorRelativePosition:40,interactionDisabled:5,geometry:0,elevationInfo:0,label:1,messageOverrides:0,_messages:0,referenceElement:1,profiles:0,progress:40,state:32,uniformChartScaling:5,distanceUnit:1,distanceUnitOptions:0,elevationUnit:1,elevationUnitOptions:0}}static{this.styles=T}get _selectButtonVisible(){return!this.hideSelectButton&&this.viewModel.selectButtonAvailable}get _chart(){return this._chartInitializationTask.value?.value}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async select(){b(this.viewModel.select())}async start(){b(this.viewModel.start())}async stop(){this.viewModel.stop()}load(){this.manager.onLifecycle(()=>[m(()=>({container:this._chartContainer,messages:this._messages}),({container:e,messages:i})=>{this._destroyChart(),!(!e||i._loading)&&(this._chartInitializationTask.value=f(async s=>await A({view:this.viewModel.view,analysisView:this.viewModel.analysisView,container:e,messages:i,rtl:this._direction==="rtl",signal:s,uniformScaling:this.viewModel.uniformChartScaling,onRangeChange:(r,l)=>{this._hideZoomOutButton=r===1&&l===1},onCursorPositionChange:(r,l)=>{let{analysisView:c}=this.viewModel;c&&(c.indicatorRelativePosition=r)}})))},{sync:!0,initial:!0}),m(()=>({chart:this._chart,messages:this._messages,view:this.viewModel.view,analysisView:this.viewModel.analysisView,uniformScaling:this.viewModel.uniformChartScaling,hideGridLines:this.hideChartGridLines,hideLabels:this.hideChartAxisLabels}),({chart:e,messages:i,view:s,analysisView:r,uniformScaling:l})=>{e&&(e.messages=i,e.view=s,e.analysisView=r,e.uniformScaling=l,e.hideGridLines=this.hideChartGridLines,e.hideAxisLabels=this.hideChartAxisLabels)},{sync:!0,initial:!0}),{remove:()=>this._destroyChart()}])}_destroyChart(){let e=this._chart;this._chartInitializationTask.value?.abort(),this._chartInitializationTask.value=void 0,e?.destroy()}_onCancelButtonClick(){this.viewModel.stop(),this.viewModel.clear()}_onDoneButtonClick(){this.viewModel.stop()}_getErrorMessage(){let e=X[this.viewModel.errorState];return e?this._messages?.errors?.[e]:void 0}_onClearButtonClick(){this.viewModel.clear()}_onZoomOutButtonClick(){this._chart?.zoomOut()}_onChartContainerRef(e){this._chartContainer=e}render(){return d`<div aria-label=${this._messages.componentLabel??g} class=${v({root:!0,[u.widget]:!0,[u.widgetDisabled]:this.viewModel.state==="disabled",[u.panel]:!0})} role=presentation>${this._renderContentForState()}</div>`}_renderContentForState(){switch(this.viewModel.state){case"ready":return this._renderContentForReadyState();case"selecting":return this._renderContentForSelectingState();case"creating":return this._renderContentForCreatingState();case"selected":return this._renderContentForSelectedState();case"created":return this._renderContentForCreatedState();case"disabled":return this._renderContentForReadyState()}}_renderContentForReadyState(){let{_messages:e,hideSelectButton:i,hideStartButton:s}=this,{selectButtonAvailable:r}=this.viewModel,l=!i&&r,c;return!s&&l?c=e.readyPrompt:s?l?c=e.readyPromptSelectOnly:c=e.errors?.noProfile:c=e.readyPromptCreateOnly,this._renderContent({prompt:c,chart:!1,actions:p})}_renderContentForSelectingState(){let{view:e}=this.viewModel;if(!e)return;let i=this._messages[`selectingPrompt-${e.type}`];return this._renderContent({prompt:i,chart:!1,actions:[{type:"select-cancel"}]})}_renderContentForCreatingState(){let{viewModel:e}=this,{view:i}=e;if(!i)return;let s=e.hasVertices?[{type:"sketch-cancel"},{type:"sketch-done",disabled:!e.doneButtonAvailable}]:[{type:"select"},{type:"sketch",disabled:!0}];if(e.errorState==="no-valid-input"){let l=this._messages[`creatingPrompt-${i.type}`];return this._renderContent({chart:!1,actions:s,prompt:l})}let r=this._getErrorMessage();return r?this._renderContent({chart:!1,actions:s,prompt:r}):this._renderContent({chart:!0,actions:s})}_renderContentForSelectedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContentForCreatedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContent(e){let{viewModel:i}=this,s=i.geometry!=null;return d`<header class="header">${h({hidden:this._hideZoomOutButton,children:this._renderZoomOutButton()})}${h({hidden:this.hideClearButton||!s,children:this._renderClearButton()})}${h({hidden:this.hideSettingsButton,children:this._renderSettingsButton()})}</header><div class="main-container">${e.prompt!=null?this._renderPrompt(e.prompt):e.chart?this._renderChart():void 0}</div>${h({hidden:this.hideLegend,children:this._renderLegend()})}${this._renderActions(e)}`}_renderPrompt(e){return[d`<div class="prompt-container"><p class="prompt-message">${e}</p></div>`]}_renderZoomOutButton(){let e=this._messages.zoomOut??"";return d`<calcite-action icon=magnifying-glass-minus @click=${this._onZoomOutButtonClick} .text=${e} title=${e??g}></calcite-action>`}_renderChart(){if(this.hideChart)return;let e=this._chart;return d`${this._renderSpinner({size:e?.chartVisible?"small":"large",visible:e?.spinnerVisible??!1})}<div class="chart-container" ${U(this._onChartContainerRef)}></div>`}_renderSpinner(e){let i=e.size==="small",s=e.visible??!0;return d`<calcite-loader class=${v({spinner:!0,small:i,visible:s})} .inline=${i} label></calcite-loader>`}_renderClearButton(){let e=this._messages.clearProfile??"";return d`<calcite-action icon=trash @click=${this._onClearButtonClick} .text=${e} title=${e??g}></calcite-action>`}_renderLegend(){return d`<arcgis-elevation-profile-legend .effectiveDisplayUnits=${this.viewModel.effectiveDisplayUnits} .featureSelected=${this.viewModel.featureIsSelected} .messages=${this._messages} .profiles=${this.profiles} .results=${this.viewModel.results}></arcgis-elevation-profile-legend>`}_renderSettingsButton(){return d`<arcgis-elevation-profile-settings .hasCustomStartContent=${this._hasSettingsStartContent} .hasCustomEndContent=${this._hasSettingsEndContent} .viewModel=${this.viewModel} .hideUniformChartScalingToggle=${this.hideUniformChartScalingToggle} .hideDistanceDisplayUnitSelect=${this.hideDistanceDisplayUnitSelect} .hideElevationDisplayUnitSelect=${this.hideElevationDisplayUnitSelect} .hideResetUnitsButton=${this.hideResetUnitsButton} .messages=${this._messages} .messageOverrides=${this.messageOverrides} .uniformChartScaling=${this.viewModel.uniformChartScaling} .unitOptionsDistance=${this.viewModel.distanceUnitOptions} .unitOptionsElevation=${this.viewModel.elevationUnitOptions} @arcgisElevationProfileSettingsUniformChartScalingChange=${e=>{this.viewModel.uniformChartScaling=e.detail}}><slot name=settings-start slot=settings-start @slotchange=${e=>{this._hasSettingsStartContent=w(e)}}></slot><slot name=settings-end slot=settings-end @slotchange=${e=>{this._hasSettingsEndContent=w(e)}}></slot></arcgis-elevation-profile-settings>`}_renderActions({actions:e}){let i=this._messages,s=e.map(r=>{switch(r.type){case"sketch":return h({hidden:this.hideStartButton,children:this._renderAction({action:r,label:i.sketchButtonLabel,primary:!0,onClick:()=>{this.start()}})});case"sketch-cancel":return h({hidden:this.hideStartButton,children:this._renderAction({action:r,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});case"sketch-done":return h({hidden:this.hideStartButton,children:this._renderAction({action:r,label:i.doneButtonLabel,primary:!0,onClick:this._onDoneButtonClick})});case"select":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:r,label:i.selectButtonLabel,primary:!1,onClick:()=>{this.select()}})});case"select-cancel":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:r,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});default:return}}).filter(Boolean);return s.length?d`<footer class="actions">${s}</footer>`:void 0}_renderAction({action:e,label:i,onClick:s,primary:r}){return d`<calcite-button .appearance=${r?"solid":"outline-fill"} class="action-button" .disabled=${e.disabled||this.interactionDisabled&&(e.type==="sketch"||e.type==="select")} @click=${s}>${i}</calcite-button>`}};function h(t){return t.hidden?void 0:t.children}var p=[{type:"select"},{type:"sketch"}],X={none:void 0,"no-valid-input":"noProfile","no-available-profiles":"noProfile","too-complex":"tooComplex",unknown:"unknown"};M("arcgis-elevation-profile",x);return x},"applications/Components/analysisUtils","applications/Components/reactiveUtils","core/promiseUtils","core/reactiveUtils","analysis/ElevationProfileAnalysis","core/accessorSupport/decorators",a,b,c,e,f,h)
@@ -0,0 +1,4 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as Ot}from"./OYG42YJL.js";import{$ as Xt,E as Wt,F as lt,Q as bt,S as Ht,T as Vt,Z as st,_ as wt,aa as Ft,ba as Ct,c as q,e as Pt,i as z,j as B,k as X,l as Nt,m as kt,n as Bt,na as Lt,o as dt,qa as Yt,xa as Dt,ya as xt,za as jt}from"./7WUY57GO.js";import{S as U,a as et,x as V}from"./AKSCONMP.js";import{a as mt,b as gt,d as F,e as D}from"./NJ3CJS46.js";import{K as Rt,X as Z,Y as zt,g as it,n as _t,p as T}from"./NXC47WWQ.js";import"./TAVTDQ6S.js";var pt=class extends zt{setupDefaultRules(){super.setupDefaultRules();let e=this._root.interfaceColors,t=this.rule.bind(this);t("PercentSeries").setAll({legendLabelText:"{category}",legendValueText:"{valuePercentTotal.formatNumber('0.00p')}",colors:jt.new(this._root,{}),width:F,height:F}),t("PieChart").setAll({radius:gt(80),startAngle:-90,endAngle:270}),t("PieSeries").setAll({alignLabels:!0,startAngle:-90,endAngle:270}),t("PieSeries").states.create("hidden",{endAngle:-90,opacity:0}),t("Slice",["pie"]).setAll({position:"absolute",isMeasured:!1,x:0,y:0,toggleKey:"active",tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}",strokeWidth:1,strokeOpacity:1,role:"figure",lineJoin:"round"}),t("Slice",["pie"]).states.create("active",{shiftRadius:20,scale:1}),t("Slice",["pie"]).states.create("hoverActive",{scale:1.04}),t("Slice",["pie"]).states.create("hover",{scale:1.04}),t("RadialLabel",["pie"]).setAll({textType:"aligned",radius:10,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",paddingTop:5,paddingBottom:5,populateText:!0}),t("Tick",["pie"]).setAll({location:1}),t("SlicedChart").setAll({paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10}),t("FunnelSeries").setAll({startLocation:0,endLocation:1,orientation:"vertical",alignLabels:!0,sequencedInterpolation:!0}),t("FunnelSlice").setAll({interactive:!0,expandDistance:0}),t("FunnelSlice").states.create("hover",{expandDistance:.15}),t("Label",["funnel"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:D}),t("Label",["funnel","horizontal"]).setAll({centerX:0,centerY:D,rotation:-90}),t("Label",["funnel","vertical"]).setAll({centerY:D,centerX:0}),t("Tick",["funnel"]).setAll({location:1}),t("FunnelSlice",["funnel","link"]).setAll({fillOpacity:.5,strokeOpacity:0,expandDistance:-.1}),t("FunnelSlice",["funnel","link","vertical"]).setAll({height:10}),t("FunnelSlice",["funnel","link","horizontal"]).setAll({width:10}),t("PyramidSeries").setAll({valueIs:"area"}),t("FunnelSlice",["pyramid","link"]).setAll({fillOpacity:.5}),t("FunnelSlice",["pyramid","link","vertical"]).setAll({height:0}),t("FunnelSlice",["pyramid","link","horizontal"]).setAll({width:0}),t("FunnelSlice",["pyramid"]).setAll({interactive:!0,expandDistance:0}),t("FunnelSlice",["pyramid"]).states.create("hover",{expandDistance:.15}),t("Label",["pyramid"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:D}),t("Label",["pyramid","horizontal"]).setAll({centerX:0,centerY:D,rotation:-90}),t("Label",["pyramid","vertical"]).setAll({centerY:D,centerX:0}),t("Tick",["pyramid"]).setAll({location:1}),t("FunnelSlice",["pictorial"]).setAll({interactive:!0,tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}"}),t("Label",["pictorial"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:D}),t("Label",["pictorial","horizontal"]).setAll({centerX:0,centerY:D,rotation:-90}),t("Label",["pictorial","vertical"]).setAll({centerY:D,centerX:0}),t("FunnelSlice",["pictorial","link"]).setAll({fillOpacity:.5,width:0,height:0}),t("Tick",["pictorial"]).setAll({location:.5});{let i=t("Graphics",["pictorial","background"]);i.setAll({fillOpacity:.2}),Vt(i,"fill",e,"alternativeBackground")}}};var G=class extends Dt{_afterNew(){this._defaultThemes.push(pt.new(this._root)),super._afterNew(),this.chartContainer.children.push(this.seriesContainer),this.seriesContainer.children.push(this.bulletsContainer)}_processSeries(e){super._processSeries(e),this.seriesContainer.children.moveValue(this.bulletsContainer,this.seriesContainer.children.length-1)}};G.className="PercentChart";G.classNames=Dt.classNames.concat([G.className]);var K=class extends Lt{constructor(){super(...arguments),this.slicesContainer=this.children.push(bt.new(this._root,{position:"absolute",isMeasured:!1})._markC("position","isMeasured")),this.labelsContainer=this.children.push(bt.new(this._root,{position:"absolute",isMeasured:!1})._markC("position","isMeasured")),this.ticksContainer=this.children.push(bt.new(this._root,{position:"absolute",isMeasured:!1})._markC("position","isMeasured")),this._lLabels=[],this._rLabels=[],this._hLabels=[],this.slices=this.addDisposer(this._makeSlices()),this.labels=this.addDisposer(this._makeLabels()),this.ticks=this.addDisposer(this._makeTicks())}_applyThemes(e=!1){let t=this.get("colors");return t&&t.reset(),super._applyThemes(e)}makeSlice(e){let t=this.slicesContainer.children.push(this.slices.make());return t.on("fill",()=>{this.updateLegendMarker(e)}),t.on("fillPattern",()=>{this.updateLegendMarker(e)}),t.on("stroke",()=>{this.updateLegendMarker(e)}),t._setDataItem(e),this._linkSprite(t,e),e.set("slice",t),this.slices.push(t),t}makeLabel(e){let t=this.labelsContainer.children.push(this.labels.make());return t._setDataItem(e),e.set("label",t),this.labels.push(t),t}_shouldMakeBullet(e){return e.get("value")!=null}makeTick(e){let t=this.ticksContainer.children.push(this.ticks.make());return t._setDataItem(e),e.set("tick",t),this.ticks.push(t),t}_afterNew(){this.fields.push("category","fill"),super._afterNew()}_placeBulletsContainer(){this.children.moveValue(this.bulletsContainer)}_onDataClear(){let e=this.get("colors");e&&e.reset();let t=this.get("patterns");t&&t.reset()}_prepareChildren(){if(super._prepareChildren(),this._lLabels=[],this._rLabels=[],this._hLabels=[],this._valuesDirty){let e=0,t=0,i=0,s=1/0,a=0;T(this._dataItems,n=>{let r=n.get("valueWorking",0);e+=r,t+=Math.abs(r)}),T(this._dataItems,n=>{let r=n.get("valueWorking",0);r>i&&(i=r),r<s&&(s=r),a++;let h=r/t;t==0&&(h=0),n.setRaw("valuePercentTotal",h*100)}),this.setPrivateRaw("valueLow",s),this.setPrivateRaw("valueHigh",i),this.setPrivateRaw("valueSum",e),this.setPrivateRaw("valueAverage",e/a),this.setPrivateRaw("valueAbsoluteSum",t)}}show(e){let t=Object.create(null,{show:{get:()=>super.show}});return et(this,void 0,void 0,function*(){let i=[];i.push(t.show.call(this,e)),i.push(this._sequencedShowHide(!0,e)),yield Promise.all(i)})}hide(e){let t=Object.create(null,{hide:{get:()=>super.hide}});return et(this,void 0,void 0,function*(){let i=[];i.push(t.hide.call(this,e)),i.push(this._sequencedShowHide(!1,e)),yield Promise.all(i)})}_updateChildren(){super._updateChildren(),this._valuesDirty&&T(this._dataItems,e=>{e.get("label").text.markDirtyText()}),(this.isDirty("legendLabelText")||this.isDirty("legendValueText"))&&T(this._dataItems,e=>{this.updateLegendValue(e)}),this._arrange()}_arrange(){this._arrangeDown(this._lLabels),this._arrangeUp(this._lLabels),this._arrangeDown(this._rLabels),this._arrangeUp(this._rLabels),this._arrangeLeft(this._hLabels),this._arrangeRight(this._hLabels),T(this.dataItems,e=>{this._updateTick(e)})}_afterChanged(){super._afterChanged(),this._arrange()}processDataItem(e){if(super.processDataItem(e),e.get("fill")==null){let t=this.get("colors");t&&e.setRaw("fill",t.next())}if(e.get("fillPattern")==null){let t=this.get("patterns");t&&e.setRaw("fillPattern",t.next())}}showDataItem(e,t){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return et(this,void 0,void 0,function*(){let s=[i.showDataItem.call(this,e,t)];it(t)||(t=this.get("stateAnimationDuration",0));let a=this.get("stateAnimationEasing"),n=e.get("value"),r=e.animate({key:"valueWorking",to:n,duration:t,easing:a});r&&s.push(r.waitForStop());let h=e.get("tick");h&&s.push(h.show(t));let u=e.get("label");u&&s.push(u.show(t));let l=e.get("slice");l&&s.push(l.show(t)),l.get("active")&&l.states.applyAnimate("active"),yield Promise.all(s)})}hideDataItem(e,t){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return et(this,void 0,void 0,function*(){let s=[i.hideDataItem.call(this,e,t)],a=this.states.create("hidden",{});it(t)||(t=a.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));let n=a.get("stateAnimationEasing",this.get("stateAnimationEasing")),r=e.animate({key:"valueWorking",to:0,duration:t,easing:n});r&&s.push(r.waitForStop());let h=e.get("tick");h&&s.push(h.hide(t));let u=e.get("label");u&&s.push(u.hide(t));let l=e.get("slice");l.hideTooltip(),l&&s.push(l.hide(t)),yield Promise.all(s)})}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("label");t&&(this.labels.removeValue(t),t.dispose());let i=e.get("tick");i&&(this.ticks.removeValue(i),i.dispose());let s=e.get("slice");s&&(this.slices.removeValue(s),s.dispose())}hoverDataItem(e){let t=e.get("slice");t&&!t.isHidden()&&t.hover()}unhoverDataItem(e){let t=e.get("slice");t&&t.unhover()}updateLegendMarker(e){if(e){let t=e.get("slice");if(t){let i=e.get("legendDataItem");if(i){let s=i.get("markerRectangle");T(Wt,a=>{t.get(a)!=null&&s.set(a,t.get(a))})}}}}_arrangeDown(e){if(e){let t=this._getNextDown();e.sort((i,s)=>i.y>s.y?1:i.y<s.y?-1:0),T(e,i=>{let s=i.label.adjustedLocalBounds(),a=s.top;i.y+a<t&&(i.y=t-a),i.label.set("y",i.y),t=i.y+s.bottom})}}_getNextUp(){return this.labelsContainer.maxHeight()}_getNextDown(){return 0}_arrangeUp(e){if(e){let t=this._getNextUp();e.sort((i,s)=>i.y<s.y?1:i.y>s.y?-1:0),T(e,i=>{let s=i.label.adjustedLocalBounds(),a=s.bottom;i.y+a>t&&(i.y=t-a),i.label.set("y",i.y),t=i.y+s.top})}}_arrangeRight(e){if(e){let t=0;e.sort((i,s)=>i.y>s.y?1:i.y<s.y?-1:0),T(e,i=>{let s=i.label.adjustedLocalBounds(),a=s.left;i.y+a<t&&(i.y=t-a),i.label._setC("x",i.y),t=i.y+s.right})}}_arrangeLeft(e){if(e){let t=this.labelsContainer.maxWidth();e.sort((i,s)=>i.y<s.y?1:i.y>s.y?-1:0),T(e,i=>{let s=i.label.adjustedLocalBounds(),a=s.right;i.y+a>t&&(i.y=t-a),i.label._setC("x",i.y),t=i.y+s.left})}}_updateSize(){super._updateSize(),this.markDirty()}_updateTick(e){}_dispose(){super._dispose();let e=this.chart;e&&e.series.removeValue(this)}};K.className="PercentSeries";K.classNames=Lt.classNames.concat([K.className]);var ot=class extends G{constructor(){super(...arguments),this._maxRadius=1,this._fits={},this._arcBounds={left:-1,right:1,top:-1,bottom:1}}_fitPie(e,t,i=0){let s=this._fits,a=s[e.uid];if(t==null){if(!a)return;delete s[e.uid]}else{if(a&&Math.abs(a.radius-t)<.5&&Math.abs(a.dx-i)<.5)return;s[e.uid]={radius:t,dx:i}}this.markDirtyKey("radius")}_fullRadius(){return V(this.get("radius",0),this._maxRadius)}_afterNew(){super._afterNew(),this.seriesContainer.setAll({x:D,y:D})}_processSeries(e){super._processSeries(e),this.series.each(t=>{t._markDirtyKey("innerRadius")})}_prepareChildren(){super._prepareChildren();let e=this.chartContainer,t=e.innerWidth(),i=e.innerHeight(),s=this.get("startAngle",0),a=this.get("endAngle",0),n=this.get("innerRadius"),r=kt(0,0,s,a,1),h=t/(r.right-r.left),u=i/(r.bottom-r.top),l={left:0,right:0,top:0,bottom:0};if(n instanceof mt&&n.value!==0){let g=n.value,o=Math.min(h,u);g=Math.max(o*g,o-Math.min(i,t))/o,l=kt(0,0,s,a,g),this.setPrivateRaw("irModifyer",g/n.value)}else this.setPrivateRaw("irModifyer",1);r=Bt([r,l]),this._arcBounds=r;let f=this._maxRadius;this._maxRadius=Math.min(h,u);let d=this.radius(),y=0;this.series.each(g=>{let o=this._fits[g.uid];o&&!y&&(y=o.dx)}),this.seriesContainer.setAll({dy:-d*(r.bottom+r.top)/2,dx:-d*(r.right+r.left)/2+y}),(this.isDirty("startAngle")||this.isDirty("endAngle")||f!=this._maxRadius)&&this.series.each(g=>{g._markDirtyKey("startAngle")}),(this.isDirty("innerRadius")||this.isDirty("radius"))&&this.series.each(g=>{g._markDirtyKey("innerRadius")})}radius(e){let t=this._fullRadius();Rt(this._fits,(s,a)=>{t=Math.min(t,a.radius)});let i=V(this.get("innerRadius",0),t);if(i<0&&(i=t+i),e){let s=this.series.indexOf(e),a=this.series.length,n=e.get("radius");return n!=null?i+V(n,t-i):i+(t-i)/a*(s+1)}return t}innerRadius(e){let t=this.radius(),i=V(this.get("innerRadius",0),t);if(i<0&&(i=t+i),e){let s=this.series.indexOf(e),a=this.series.length,n=e.get("innerRadius");return n!=null?i+V(n,t-i):i+(t-i)/a*s}return i}_updateSize(){super._updateSize(),this.markDirtyKey("radius")}};ot.className="PieChart";ot.classNames=G.classNames.concat([ot.className]);var ht=class extends K{constructor(){super(...arguments),this._fitOn=!1,this._fitMode=0,this._labelBoxes={},this._fitFrames=0,this._fitSize="",this._relayout=0}_makeSlices(){return new q(Z.new({}),()=>Ot._new(this._root,{themeTags:U(this.slices.template.get("themeTags",[]),["pie","series"])},[this.slices.template]))}_makeLabels(){return new q(Z.new({}),()=>Yt._new(this._root,{themeTags:U(this.labels.template.get("themeTags",[]),["pie","series"])},[this.labels.template]))}_makeTicks(){return new q(Z.new({}),()=>xt._new(this._root,{themeTags:U(this.ticks.template.get("themeTags",[]),["pie","series"])},[this.ticks.template]))}processDataItem(e){super.processDataItem(e);let t=this.makeSlice(e);t.on("scale",()=>{this._updateTick(e)}),t.on("shiftRadius",()=>{this._updateTick(e)}),t.events.on("positionchanged",()=>{this._updateTick(e)});let i=this.makeLabel(e);i.events.on("positionchanged",()=>{this._updateTick(e)}),this.makeTick(e),t.events.on("positionchanged",()=>{i.markDirty()})}_getNextUp(){let e=this.chart;return e?this._fitMode?e.chartContainer.innerHeight()/2-e.seriesContainer.get("dy",0):e._maxRadius:this.labelsContainer.maxHeight()/2}_getNextDown(){let e=this.chart;return e?this._fitMode?-e.chartContainer.innerHeight()/2-e.seriesContainer.get("dy",0):-e._maxRadius:-this.labelsContainer.maxHeight()/2}_beforeChanged(){super._beforeChanged(),this.get("autoLabels")&&!this._fitOn&&(this._fitOn=!0,this._disposers.push(this._root.events.on("frameended",()=>{this._autoFit()})))}_dispose(){let e=this.chart;e&&!e.isDisposed()&&e._fitPie(this),super._dispose()}_labelEndAngle(e){if(this.get("autoLabels")&&(this.isHidden()||this.isShowing()||this.isHiding())){let t=this.states.lookup("default"),i=t?t.get("endAngle"):void 0;if(i!=null)return i}return e}_autoFit(){let e=this.chart;if(!e||e.isDisposed()||this.isDisposed())return;let t=!this.get("autoLabels")||e.series.indexOf(this)<0?0:this.get("alignLabels")?1:2;if(t!=this._fitMode){this._fitMode=t,this._releaseLabels(e);return}if(!t)return;if(this._fitHoleLabels(e),_t(this._dataItems,r=>{let h=r.get("slice");return h!=null&&(h.isShowing()||h.isHiding())})){this._fitFrames=3,this.markDirty();return}let i=e.chartContainer,s=i.innerWidth(),a=i.innerHeight();if(!(s>0&&a>0&&e.radius()>0))return;let n=[s,a,this._root._fontLoads].join();this._fitFrames<=0&&this._relayout<=0&&n==this._fitSize||(this._fitSize=n,this._fitFrames--,this._relayout>0&&(this._relayout--,this.markDirtyKey("radius")),(t==1?this._fitAligned(e,s,a):this._fitAround(e,s,a))&&(this._relayout=2))}_releaseLabels(e){e._fitPie(this),T(this._dataItems,t=>{let i=t.get("label");i&&(this._showLabel(t,!0),this._fitLabel(i))}),this._fitHoleLabels(e,!0),this._labelBoxes={},this.markDirtyKey("radius")}_fitHoleLabels(e,t){let i=e.innerRadius(this)*e.getPrivate("irModifyer",1);i<0&&(i=e.radius(this)+i);let s=["maxWidth","maxHeight","oversizedBehavior"];T(e.series.indexOf(this)==0?[this,e.seriesContainer]:[this],a=>{a.children.each(n=>{let r=n;if(n.className!="Label"||n.isDisposed()||_t(s,y=>r.isUserSetting(y)&&!r.isComputedSetting(y)))return;let h=wt(r.text),u=h.widest,l=h.height,f=!t&&i>0&&u>0?1.8*i/Math.sqrt(u*u+l*l):1,d=f<.999;st(r,s[0],d?u*f+r.get("paddingLeft",0)+r.get("paddingRight",0):void 0,.5),st(r,s[1],d?l*f+r.get("paddingTop",0)+r.get("paddingBottom",0):void 0,.5),st(r,s[2],d?"fit":void 0)})})}_showLabel(e,t){let i=t?void 0:!0,s=e.get("tick"),a=st(e.get("label"),"forceHidden",i);return s!=null&&st(s,"forceHidden",i)||a}_labelGone(e,t){return e.isHidden()||t.isHidden()||t.isHiding()||t.get("forceHidden",!1)&&!t.isComputedSetting("forceHidden")}_templateValue(e,t){let i=e.template,s=i?i.get(t):void 0;return s??this.labels.template.get(t)}_fitWays(e){let t=s=>e.isUserSetting(s)&&!e.isComputedSetting(s),i=this._templateValue(e,"oversizedBehavior");return t("maxWidth")||t("oversizedBehavior")?0:i=="truncate"?1:i==null||i=="wrap"||i=="wrap-no-break"?2:0}_oneLine(e){let t=wt(e.text);return{full:t.width&&t.width+(t.count-1)*t.tallest*.3,line:t.tallest}}_fitLabel(e,t,i){let s;if(t!=null){t=Math.min(t,this._templateValue(e,"maxWidth")||1/0);let n=this._templateValue(e,"oversizedBehavior");n!="truncate"&&!(n&&i)&&(s=i?"wrap":"truncate")}let a=st(e,"maxWidth",t,.5);return st(e,"oversizedBehavior",s)||a}_countLines(e,t,i){let s=this._textWeight(e);if(i<=0||s<=0)return 1/0;let a=t/s,n=a/2,r=i*.95,h=1,u=0;return T(e.replace(/\[[^\[\]]*\]/g,"").split(/\s/),l=>{let f=this._textWeight(l)*a;f>r&&(h=1/0),u>0&&u+n+f>r&&(h++,u=0),u+=(u>0?n:0)+f}),h}_textWeight(e){e=e.replace(/\[[^\[\]]*\]/g,"");let t=0;for(let i=0;i<e.length;i++){let s=e.charAt(i);t+=` ijl.,:;'!|
3
+ `.indexOf(s)!=-1?.5:"frtI()[]-/".indexOf(s)!=-1?.65:"mwMW%@".indexOf(s)!=-1?1.5:s>="A"&&s<="Z"?1.2:1}return t}_labelBox(e,t,i,s){let a=Xt(e),n=this._labelBoxes[e.uid];n&&(n.font!==a||Math.abs((n.share==null?i:n.share)-i)>.1)&&(n=void 0);let r=e.isComputedSetting("maxWidth")||e.isComputedSetting("forceHidden")?void 0:s();if(r)r.font=a,r.share=i;else if(n&&(r=n,n.text!=t)){let h=this._textWeight(n.text),u=h>0?this._textWeight(t)/h:1,l=(n.right-n.left)*(u-1);r={text:t,left:n.left-l*i,right:n.right+l*(1-i),top:n.top,bottom:n.bottom,full:n.full*u,line:n.line,font:a,share:n.share}}return r}_fitAligned(e,t,i){let s=e._fullRadius(),a=Math.min(s,Math.min(t,i)/4),n=this.labelsContainer,r=40,h=[[],[]],u={},l=[0,0],f=[0,0],d=!1;T(this._dataItems,x=>{let _=x.get("label");if(!_||_.isDisposed())return;let p=_.text._getText(),c=_.get("paddingLeft",0)+_.get("paddingRight",0),k=_.get("paddingTop",0)+_.get("paddingBottom",0),C=this._labelGone(x,_),w=this._labelBox(_,p,0,()=>{let R=_.width();if(C||!(R>0))return;let A=_.adjustedLocalBounds(),S=A.bottom-A.top,P=this._oneLine(_);return{text:p,left:0,right:R,top:0,bottom:S,full:P.full||R-c,line:P.line||S-k}});if(w&&(u[_.uid]=w),C)return;if(!w){this._showLabel(x,!0),this._fitLabel(_),d=!0;return}let L=_.getPrivate("left")?0:1,M=_.get("radius",0)+n.get(L?"paddingRight":"paddingLeft",0);l[L]=Math.max(l[L],w.right+M),f[L]=Math.max(f[L],M),h[L].push({dataItem:x,label:_,box:w,value:Math.abs(x.get("value",0)),pad:c,padV:k,show:!1})}),this._labelBoxes=u;let y=e._arcBounds,g=s,o=t/2,m=o,b=[0,0];for(let x=0;x<3;x++){let _=l[0]+l[1],p=[l[0]>0?1:-y.left,l[1]>0?1:y.right];g=Math.max(a,Math.min(s,(t-_)/(p[0]+p[1])));let c=g*p[0],k=c+g*p[1];m=t/2-g*(y.left+y.right)/2,o=_+k>t?c+(t-k)*l[0]/_:Math.min(Math.max(m,l[0]+c),t-l[1]-g*p[1]),b[0]=o-g-f[0],b[1]=t-o-g-f[1];let C=!1;if(T(b,(w,L)=>{l[L]>0&&w<r&&(l[L]=0,C=!0)}),!C)break}let v=0;T(h,(x,_)=>{x.sort((c,k)=>k.value-c.value);let p=0;T(x,c=>{c.show=l[_]>0&&p+c.box.bottom<=i+.5,c.show&&(p+=c.box.bottom)}),T(x,c=>{let k=c.label,C=c.box,w,L=!1;if(c.show&&C.right>b[_]){let M=this._fitWays(k);w=b[_];let R=M>1?this._countLines(C.text,C.full,w-c.pad):1/0,A=Math.max(0,R*C.line+c.padV-C.bottom);R<=3&&p+A<=i+.5&&(L=!0,p+=A),M||(c.show=!1,p-=C.bottom)}c.show&&v++,this._showLabel(c.dataItem,c.show)&&(d=!0),this._fitLabel(k,c.show?w:void 0,L)&&(d=!0)})});let $=v?o-m:0;return e._fitPie(this,v&&(g<s-.5||Math.abs($)>.5)?g:void 0,$),d}_fitAround(e,t,i){let s=e.radius(),a=e._fullRadius(),n=Math.min(a,Math.min(t,i)/4),r=e.chartContainer.globalBounds(),h=this.labelsContainer,u=h.toGlobal({x:0,y:0}),l=h.toGlobal({x:1,y:0}).x-u.x,f=e._arcBounds,d={x:(f.left+f.right)/2,y:(f.top+f.bottom)/2},y=40,g=(p,c)=>Math.min(1+c>.01?2*(r.right-p)/(1+c):1/0,1-c>.01?2*(p-r.left)/(1-c):1/0),o=[],m={},b=!1,v=a;T(this._dataItems,p=>{let c=p.get("label");if(!c||c.isDisposed())return;let k=c.text._getText(),C=this._labelGone(p,c),w=c.get("labelAngle",0),L=X(w),M=z(w),R=c.baseRadius(),A=R==0?0:c.radius(),S=u.x+l*A*L,P=u.y+l*A*M,Y=c.get("textType"),N=Y=="adjusted"&&!c.get("inside"),O=c.get("centerX"),W=this._labelBox(c,k,N?(1-L)/2:O instanceof mt?O.value:0,()=>{let H=C?void 0:c._arcGlobalBounds()||c.text.globalBounds();if(!H||!(H.right>H.left))return;let ft=this._oneLine(c);return{text:k,left:H.left-S,right:H.right-S,top:H.top-P,bottom:H.bottom-P,full:ft.full*l||H.right-H.left,line:ft.line*l||H.bottom-H.top}});if(W&&(m[c.uid]=W),C)return;if(!W){this._showLabel(p,!0),this._fitLabel(c),b=!0;return}let j={left:S+W.left,right:S+W.right,top:P+W.top,bottom:P+W.bottom},tt=R/s,at=l*(tt*L-d.x),nt=l*(tt*M-d.y),Tt=(H,ft)=>{let vt=1/0;return T([[r.right-ft,at],[H-r.left,-at],[r.bottom-j.bottom,nt],[j.top-r.top,-nt]],Mt=>{let St=Y=="circular"?l*tt:Mt[1];St>.01&&(vt=Math.min(vt,s+Mt[0]/St))}),vt},At=H=>Tt(S-H*(1-L)/2,S+H*(1+L)/2),$t=N&&k.indexOf(`
4
+ `)==-1?this._fitWays(c):0,rt=Tt(j.left,j.right);rt<n-.5&&$t&&(rt=At(Math.max(y,(j.right-j.left)/2)),rt<n&&At(y)>=n&&(rt=n)),rt>=n-.5&&(v=Math.min(v,rt)),o.push({dataItem:p,label:c,value:Math.abs(p.get("value",0)),box:j,own:W,x:S,y:P,vx:at,vy:nt,grow:tt,cos:L,sin:M,ways:$t})}),this._labelBoxes=m,v=Math.max(v,n),b&&(v=Math.min(v,s)),e._fitPie(this,v<a-.5?v:void 0);let $=(p,c)=>{if(p.inner>=c.outer-.5||c.inner>=p.outer-.5)return!1;let k=Math.max(2,Math.min(p.outer-p.inner,c.outer-c.inner)*.3)/Math.max(1,Math.min(p.inner,c.inner))*Pt,C=(w,L)=>((L.start-w.start)%360+360)%360<w.end-w.start+k;return C(p,c)||C(c,p)},x=[],_=e.radius()-s;return o.sort((p,c)=>c.value-p.value),T(o,p=>{let c=p.label,k=p.own,C=p.x+_*p.vx,w=p.y+_*p.vy,L=c._arcSize(),M=L?c._arc(L,c.radius()+_*p.grow):void 0,R=N=>Ct(N,r)&&!_t(x,O=>M&&O.arc?$(M,O.arc):Ft(N,O.box)),A={left:C+k.left,right:C+k.right,top:w+k.top,bottom:w+k.bottom},S,P=!1;if(p.ways&&!Ct(A,r)){let N=g(C,p.cos),O=(c.get("paddingLeft",0)+c.get("paddingRight",0))*l,W=(c.get("paddingTop",0)+c.get("paddingBottom",0))*l,j=tt=>{let at=C+N/2*p.cos,nt=w+tt/2*p.sin;return{left:at-N/2,right:at+N/2,top:nt-tt/2,bottom:nt+tt/2}};A=void 0,N>=y&&N<k.right-k.left+O&&(S=N/l,A=j((p.ways>1?this._countLines(k.text,k.full,N-O):1/0)*k.line+W),P=A.bottom-A.top<=3*k.line+W+.5&&R(A),P||(A=j(k.bottom-k.top)))}let Y=A!=null&&R(A);Y&&x.push({box:A,arc:M}),this._showLabel(p.dataItem,Y),this._fitLabel(c,Y?S:void 0,P)}),b}_prepareChildren(){super._prepareChildren(),this._fitMode&&(this._fitFrames=3);let e=this.chart;if(e){if(this.isDirty("alignLabels")){let t=this.labels.template;if(this.get("alignLabels"))t._setC("textType","aligned");else{let i=t.get("textType");(i==null||i=="aligned")&&t._setC("textType","adjusted")}}if(this._valuesDirty||this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("endAngle")||this.isDirty("alignLabels")){this.markDirtyBounds();let t=this.get("startAngle",e.get("startAngle",-90)),i=this.get("endAngle",e.get("endAngle",270)),s=i-t,a=t,n=this._labelEndAngle(i)-t,r=t,h=e.radius(this);this.setPrivateRaw("radius",h);let u=e.innerRadius(this)*e.getPrivate("irModifyer",1);u<0&&(u=h+u),T(this._dataItems,l=>{this.updateLegendValue(l);let f=s*l.get("valuePercentTotal")/100,d=l.get("slice");if(d){d.set("radius",h),d.set("innerRadius",u),d.set("startAngle",a),d.set("arc",f);let m=l.get("fill");d._setDefault("fill",m),d._setDefault("stroke",m);let b=l.get("fillPattern");d._setDefault("fillPattern",b)}let y=n*l.get("valuePercentTotal")/100,g=Nt(r+y/2);r+=y;let o=l.get("label");if(o&&(o.setPrivate("radius",h),o.setPrivate("innerRadius",u),o.set("labelAngle",g),o.get("textType")=="aligned")){let m=h+o.get("radius",0),b=h*z(g);g>90&&g<=270?(!o.isHidden()&&!o.isHiding()&&!o.get("forceHidden")&&this._lLabels.push({label:o,y:b}),m*=-1,m-=this.labelsContainer.get("paddingLeft",0),o.set("centerX",F),o.setPrivateRaw("left",!0)):(!o.isHidden()&&!o.isHiding()&&!o.get("forceHidden")&&this._rLabels.push({label:o,y:b}),m+=this.labelsContainer.get("paddingRight",0),o.set("centerX",0),o.setPrivateRaw("left",!1)),o.set("x",m),o.set("y",h*z(g))}a+=f,this._updateTick(l)})}}}_updateTick(e){let t=e.get("tick"),i=e.get("label"),s=e.get("slice"),a=t.get("location",1);if(t&&i&&s){let n=(s.get("shiftRadius",0)+s.get("radius",0))*s.get("scale",1)*a,r=i.get("labelAngle",0),h=X(r),u=z(r),l=this.labelsContainer,f=l.get("paddingLeft",0),d=l.get("paddingRight",0),y=0,g=0;y=i.x(),g=i.y();let o=[];if(y!=0||g!=0){if(i.get("textType")=="circular"){let b=i.radius()-i.get("paddingBottom",0),v=i.get("labelAngle",0);y=b*X(v),g=b*z(v)}let m=-d;i.getPrivate("left")&&(m=f),o=[{x:s.x()+n*h,y:s.y()+n*u},{x:y+m,y:g},{x:y,y:g}]}t.set("points",o)}}_positionBullet(e){let t=e.get("sprite");if(t){let s=t.dataItem.get("slice");if(s){let a=s.get("innerRadius",0),n=s.get("radius",0),r=s.get("startAngle",0),h=s.get("arc",0),u=e.get("locationX",.5),l=e.get("locationY",.5),f=r+h*u,d=a+(n-a)*l;t.setAll({x:X(f)*d,y:z(f)*d})}}}};ht.className="PieSeries";ht.classNames=K.classNames.concat([ht.className]);var J=class extends lt{constructor(){super(...arguments),this._projectionDirty=!1,this._tlx=0,this._tly=0,this._trx=0,this._try=0,this._blx=0,this._bly=0,this._brx=0,this._bry=0,this._cprx=0,this._cplx=0,this._cpry=0,this._cply=0}_afterNew(){super._afterNew(),this.set("draw",e=>{let t=this.width(),i=this.height(),s=Math.min(t,i)/2,a=V(this.get("cornerRadiusTL",0),s),n=V(this.get("cornerRadiusTR",0),s),r=V(this.get("cornerRadiusBR",0),s),h=V(this.get("cornerRadiusBL",0),s),u=this._trx,l=this._try,f=this._tlx,d=this._tly,y=this._brx,g=this._bry,o=this._blx,m=this._bly;l==d&&(l=l-.01),g==m&&(g=g-.01);let b=dt({x:f,y:d},{x:u,y:l}),v=dt({x:u,y:l},{x:y,y:g}),$=dt({x:y,y:g},{x:o,y:m}),x=dt({x:o,y:m},{x:f,y:d});this.get("orientation")=="horizontal"?(a=Math.min(a,Math.abs(d-l)/2),n=Math.min(n,Math.abs(d-l)/2),r=Math.min(r,Math.abs(m-g)/2),h=Math.min(h,Math.abs(m-g)/2)):(a=Math.min(a,Math.abs(f-u)/2),n=Math.min(n,Math.abs(f-u)/2),r=Math.min(r,Math.abs(o-y)/2),h=Math.min(h,Math.abs(o-y)/2));let _=f-a*B((b-x)/2)*X(x),p=d-a*B((b-x)/2)*z(x),c=f-a*B((x-b)/2)*X(b),k=d-a*B((x-b)/2)*z(b),C=u-n*B((v-b)/2)*X(b),w=l-n*B((v-b)/2)*z(b),L=u-n*B((b-v)/2)*X(v),M=l-n*B((b-v)/2)*z(v),R=y-r*B(($-v)/2)*X(v),A=g-r*B(($-v)/2)*z(v),S=y-r*B((v-$)/2)*X($),P=g-r*B((v-$)/2)*z($),Y=o-h*B((x-$)/2)*X($),N=m-h*B((x-$)/2)*z($),O=o-h*B(($-x)/2)*X(x),W=m-h*B(($-x)/2)*z(x);e.moveTo(c,k),e.lineTo(C,w),e.arcTo(u,l,L,M,n),e.quadraticCurveTo(this._cprx,this._cpry,R,A),e.arcTo(y,g,S,P,r),e.lineTo(Y,N),e.arcTo(o,m,O,W,h),e.quadraticCurveTo(this._cplx,this._cply,_,p),e.arcTo(f,d,c,k,a)})}getPoint(e,t){let i=this.width(),s=this.height(),a=this.get("topWidth",0),n=this.get("bottomWidth",0);if(this.get("orientation")=="vertical"){let r=-a/2,h=a/2,u=n/2,l=-n/2,f=r+(l-r)*t,d=h+(u-h)*t;return{x:f+(d-f)*e,y:s*t}}else{let r=-a/2,h=a/2,u=n/2,l=-n/2,f=r+(l-r)*e,d=h+(u-h)*e;return{x:i*e,y:f+(d-f)*t}}}_changed(){if(this.isDirty("topWidth")||this.isDirty("bottomWidth")||this.isDirty("expandDistance")||this.isDirty("orientation")||this.isDirty("width")||this.isDirty("height")||this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL")){let e=this.width(),t=this.height(),i=this.get("topWidth",0),s=this.get("bottomWidth",0);this._clear=!0;let a=this.get("expandDistance",0);this.get("orientation")=="vertical"?(this._tlx=-i/2,this._tly=0,this._trx=i/2,this._try=0,this._brx=s/2,this._bry=t,this._blx=-s/2,this._bly=t,this._cprx=this._trx+(this._brx-this._trx)/2+a*t,this._cpry=this._try+.5*t,this._cplx=this._tlx+(this._blx-this._tlx)/2-a*t,this._cply=this._tly+.5*t):(this._tly=i/2,this._tlx=0,this._try=-i/2,this._trx=0,this._bry=-s/2,this._brx=e,this._bly=s/2,this._blx=e,this._cpry=this._try+(this._bry-this._try)/2-a*e,this._cprx=this._trx+.5*e,this._cply=this._tly+(this._bly-this._tly)/2+a*e,this._cplx=this._tlx+.5*e)}super._changed()}};J.className="FunnelSlice";J.classNames=lt.classNames.concat([J.className]);var Q=class extends K{constructor(){super(...arguments),this._tag="funnel",this.links=this.addDisposer(this._makeLinks()),this._total=0,this._count=0,this._nextCoord=0,this._opposite=!1}_makeSlices(){return new q(Z.new({}),()=>J._new(this._root,{themeTags:U(this.slices.template.get("themeTags",[]),[this._tag,"series","slice",this.get("orientation")])},[this.slices.template]))}_makeLabels(){return new q(Z.new({}),()=>Ht._new(this._root,{themeTags:U(this.labels.template.get("themeTags",[]),[this._tag,"series","label",this.get("orientation")])},[this.labels.template]))}_makeTicks(){return new q(Z.new({}),()=>xt._new(this._root,{themeTags:U(this.ticks.template.get("themeTags",[]),[this._tag,"series","tick",this.get("orientation")])},[this.ticks.template]))}_makeLinks(){return new q(Z.new({}),()=>J._new(this._root,{themeTags:U(this.links.template.get("themeTags",[]),[this._tag,"series","link",this.get("orientation")])},[this.links.template]))}makeLink(e){let t=this.slicesContainer.children.push(this.links.make());return t._setDataItem(e),e.set("link",t),this.links.push(t),t}_afterNew(){super._afterNew();let e=this.slicesContainer;e._setCAll({isMeasured:!0,position:"relative",width:gt(100),height:gt(100)}),e.onPrivate("width",()=>{this.markDirtySize()}),e.onPrivate("height",()=>{this.markDirtySize()}),this.get("orientation")=="vertical"?this._setC("layout",this._root.horizontalLayout):this._setC("layout",this._root.verticalLayout)}processDataItem(e){super.processDataItem(e);let t=this.makeSlice(e);t._setDataItem(e),e.set("slice",t),this.makeLink(e);let i=this.makeLabel(e);i.on("x",()=>{this._updateTick(e)}),i.on("y",()=>{this._updateTick(e)}),this.makeTick(e),t.events.on("positionchanged",()=>{i.markDirty()}),t.events.on("boundschanged",()=>{let s=t.dataItem;s&&this._updateTick(s)})}_updateChildren(){this._opposite=!1,this.children.indexOf(this.labelsContainer)==0&&(this._opposite=!0);let e=0,t=0;if(T(this.dataItems,i=>{let s=i.get("value");it(s)&&(t++,s>0?e+=Math.abs(i.get("valueWorking",s)/s):this.get("ignoreZeroValues",!1)||i.isHidden()?t--:e+=1)}),this._total=1/t*e,this._count=t,this.isDirty("alignLabels")&&this._fixLayout(),this._total>0&&(this._valuesDirty||this._sizeDirty||this.isDirty("bottomRatio")||this.isDirty("startLocation")||this.isDirty("endLocation"))){let i=this._sliceBox();this.get("orientation")=="vertical"?this._nextCoord=i.top+this.get("startLocation",0)*(i.bottom-i.top):this._nextCoord=i.left+this.get("startLocation",0)*(i.right-i.left),this.markDirtyBounds();let s=0;T(this._dataItems,a=>{this.updateLegendValue(a),a.set("index",s),s++;let n=a.get("slice"),r=a.get("tick"),h=a.get("label"),u=a.get("link"),l=a.get("fill"),f=a.get("fillPattern");n._setDefault("fill",l),n._setDefault("stroke",l),n._setDefault("fillPattern",f),u._setDefault("fill",l),u._setDefault("stroke",l);let d=a.get("value");it(d)&&(d==0&&this.get("ignoreZeroValues")?(n.setPrivate("visible",!1),r.setPrivate("visible",!1),h.setPrivate("visible",!1)):(n.setPrivate("visible",!0),r.setPrivate("visible",!0),h.setPrivate("visible",!0),this.decorateSlice(a),this.isLast(a)?u.setPrivate("visible",!1):a.isHidden()||u.setPrivate("visible",!0)))})}super._updateChildren()}_fixLayout(){let e=this.get("orientation"),t=this.labelsContainer,i=this.labels.template;this.get("alignLabels")?(t._setC("position","relative"),t._setCAll({isMeasured:!0}),e=="vertical"?(this._setC("layout",this._root.horizontalLayout),i._setCAll({centerX:F,x:F})):(this._setC("layout",this._root.verticalLayout),i._setCAll({centerX:0,x:0}))):(t._setCAll({isMeasured:!1,position:"absolute"}),e=="vertical"?(t._setCAll({x:D}),i._setCAll({centerX:D,x:0})):(t._setCAll({y:D}),i._setCAll({centerX:D,y:0}))),this.markDirtySize()}getNextValue(e){let t=e.get("index"),i=e.get("valueWorking",0);if(t<this.dataItems.length-1){let s=this.dataItems[t+1];if(i=s.get("valueWorking",0),s.isHidden()||s.get("value")==0&&this.get("ignoreZeroValues"))return this.getNextValue(s)}return i}isLast(e){let t=e.get("index");if(t==this.dataItems.length-1)return!0;for(let i=t+1;i<this.dataItems.length;i++)if(!this.dataItems[i].isHidden())return!1;return!0}decorateSlice(e){let t=this.get("orientation"),i=e.get("slice"),s=e.get("label"),a=e.get("link"),n=this._sliceBox(),r=n.right-n.left,h=n.bottom-n.top,u=r;t=="horizontal"&&(u=h);let l=this.getNextValue(e),f=e.get("value",0),d=Math.abs(e.get("valueWorking",f)),y=this.get("bottomRatio",0),g=this.getPrivate("valueHigh",0),o=1;f!=0?o=d/Math.abs(f):e.isHidden()&&(o=1e-6),this._nextCoord==1/0&&(this._nextCoord=0);let m=d/g*u,b=(d-(d-l)*y)/g*u;i._setCAll({topWidth:m,bottomWidth:b,orientation:t}),a._setCAll({topWidth:b,bottomWidth:(d-(d-l))/g*u,orientation:t});let v=this.get("startLocation",0),$=this.get("endLocation",1);if(t=="vertical"){let x=a.height()*o;h=h*($-v)+x,i._setC("y",this._nextCoord);let _=Math.min(1e5,Math.max(0,h/this._count*o/this._total-x));i._setCAll({height:_,x:n.left+r/2});let p=this._nextCoord+_/2;s._setC("y",p),this._nextCoord+=_+x,a._setCAll({y:this._nextCoord-x,x:n.left+r/2})}else{let x=a.width()*o;r=r*($-v)+x,i._setC("x",this._nextCoord);let _=Math.min(1e5,Math.max(0,r/this._count*o/this._total-x));i._setCAll({width:_,y:n.top+h/2});let p=this._nextCoord+_/2;s._setC("x",p),this._nextCoord+=_+x,a._setCAll({x:this._nextCoord-x,y:n.top+h/2})}}hideDataItem(e,t){let i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return et(this,void 0,void 0,function*(){return e.get("link").hide(t),i.hideDataItem.call(this,e,t)})}showDataItem(e,t){let i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return et(this,void 0,void 0,function*(){return e.get("link").show(t),i.showDataItem.call(this,e,t)})}_sliceBox(){let e=this.slicesContainer;return{left:0,top:0,right:e.innerWidth(),bottom:e.innerHeight()}}_updateTick(e){if(this.get("alignLabels")){let t=e.get("tick"),i=e.get("label"),s=e.get("slice");if(t&&s&&i){let a=this.labelsContainer,n=this.slicesContainer,r=t.get("location",.5),h=a.width(),u=a.height(),l=a.get("paddingLeft",0),f=a.get("paddingRight",0),d=a.get("paddingTop",0),y=a.get("paddingBottom",0),g={x:0,y:0},o={x:0,y:0},m={x:0,y:0};this._opposite&&(r=1-r),this.get("orientation")=="vertical"?(g=s.getPoint(r,.5),g.x+=s.x()+n.x(),g.y+=s.y()+n.y(),this._opposite?(o.x=h,o.y=i.y(),m.x=h-l,m.y=o.y):(o.x=n.x()+n.width(),o.y=i.y(),m.x=o.x+h-i.width()-f,m.y=o.y)):(g=s.getPoint(.5,r),g.x+=s.x()+n.x(),g.y+=s.y()+n.y(),this._opposite?(o.y=u,o.x=i.x(),m.y=u-d,m.x=o.x):(o.y=n.y()+n.height(),o.x=i.x(),m.y=o.y+u-i.height()-y,m.x=o.x)),t.set("points",[g,o,m])}}else{let t=e.get("tick");t&&t._setC("points",[])}}disposeDataItem(e){super.disposeDataItem(e);let t=e.get("link");t&&(this.links.removeValue(t),t.dispose())}_positionBullet(e){let t=e.get("sprite");if(t){let s=t.dataItem.get("slice");if(s){let a=s.getPoint(e.get("locationX",.5),e.get("locationY",.5));t.setAll({x:s.x()+a.x,y:s.y()+a.y})}}}};Q.className="FunnelSeries";Q.classNames=K.classNames.concat([Q.className]);var I=class extends Q{constructor(){super(...arguments),this._tag="pyramid"}_prepareChildren(){super._prepareChildren(),this._nextSize=void 0,(this.isDirty("topWidth")||this.isDirty("bottomWidth")||this.isDirty("valueIs"))&&(this._valuesDirty=!0)}decorateSlice(e){let t=this.get("orientation"),i=e.get("slice"),s=e.get("label"),a=e.get("link"),n=this.get("valueIs","area"),r=this.getPrivate("valueAbsoluteSum",0);if(r==0)return;let h=this.get("startLocation",0),u=this.get("endLocation",1),l=this.get("topWidth",0),f=this.get("bottomWidth",F),d=Math.abs(e.get("valueWorking",0)),y=e.get("value",0),g,o,m=this._sliceBox(),b=m.bottom-m.top,v=m.right-m.left,$=m.left,x=a.width(),_=a.height();t=="horizontal"&&([v,b]=[b,v],[x,_]=[_,x],$=m.top);let p=$+v/2,c=1;y!=0?c=d/Math.abs(y):e.isHidden()&&(c=1e-6),_*=c,b=b*(u-h)-_*(this._count*this._total-1);let k=V(l,v);it(this._nextSize)||(this._nextSize=k);let C=V(f,v),w=this._nextSize,L=Math.atan2(b,k-C),M=Math.tan(Math.PI/2-L);if(M==0&&(M=1e-8),n=="area"){let W=(k+C)/2*b*d/r,j=Math.abs(w*w-2*W*M);g=(w-Math.sqrt(j))/M,g>0?o=(2*W-g*w)/g:o=w}else g=b*d/r,o=w-g*M;let R=this._nextCoord+g/2,A=p,S=this._nextCoord,P=p,Y=S+g,N=this.get("alignLabels")&&s.get("opacity")>0;t=="vertical"?(s.set("y",R),N&&this._rLabels.push({label:s,y:R}),i.set("height",g)):(s.set("x",R),N&&this._hLabels.push({label:s,y:R}),[A,S]=[S,A],[P,Y]=[Y,P],i.set("width",g)),i.setAll({orientation:t,bottomWidth:o,topWidth:w,x:A,y:S}),a.setAll({orientation:t,x:P,y:Y,topWidth:o,bottomWidth:o}),this._nextSize=o,this._nextCoord+=g+_}};I.className="PyramidSeries";I.classNames=Q.classNames.concat([I.className]);var ct=class extends I{constructor(){super(...arguments),this._tag="pictorial",this.seriesMask=lt.new(this._root,{position:"absolute",x:D,y:D,centerX:D,centerY:D}),this.seriesGraphics=this.slicesContainer.children.push(lt.new(this._root,{themeTags:["pictorial","background"],position:"absolute",x:D,y:D,centerX:D,centerY:D})._markC("themeTags","position","x","y","centerX","centerY"))}_afterNew(){super._afterNew(),this._setC("topWidth",F),this._setC("bottomWidth",F),this._setC("valueIs","height"),this.slicesContainer._setC("mask",this.seriesMask)}_updateScale(){let e=this.slicesContainer,t=e.innerWidth(),i=e.innerHeight(),s=this.seriesMask,a=this.seriesGraphics,n=s.get("scale",1),r=s.localBounds(),h=r.right-r.left,u=r.bottom-r.top;n=Math.min(t/h,i/u),n!=1/0&&!Number.isNaN(n)&&(n!=s.get("scale")&&this.markDirtySize(),s.set("scale",n),s.set("x",t/2),s.set("y",i/2),a._setC("scale",n),a._setC("x",t/2),a._setC("y",i/2))}_sliceBox(){let e=super._sliceBox(),t=this.seriesMask.localBounds(),i=this.seriesMask.get("scale",1),s=(t.right-t.left)*i,a=(t.bottom-t.top)*i;if(!(s>0&&a>0))return e;let n=(e.left+e.right)/2,r=(e.top+e.bottom)/2;return{left:n-s/2,right:n+s/2,top:r-a/2,bottom:r+a/2}}_prepareChildren(){if(super._prepareChildren(),this.isDirty("svgPath")){let e=this.get("svgPath");this.seriesMask.set("svgPath",e),this.seriesGraphics._setC("svgPath",e)}this._updateScale()}};ct.className="PictorialStackedSeries";ct.classNames=I.classNames.concat([ct.className]);var ut=class extends G{_afterNew(){super._afterNew(),this.seriesContainer.setAll({isMeasured:!0,layout:this._root.horizontalLayout})}};ut.className="SlicedChart";ut.classNames=G.classNames.concat([ut.className]);export{pt as DefaultTheme,Q as FunnelSeries,J as FunnelSlice,G as PercentChart,K as PercentSeries,ct as PictorialStackedSeries,ot as PieChart,ht as PieSeries,I as PyramidSeries,ut as SlicedChart};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import w from"./DVH35LZL.js";import"./UIDNNWPD.js";import{a as V}from"./4L43F7HU.js";import u from"./EZFBYRI4.js";import t from"./O2RCWKKW.js";import s from"./WRB2DEQ6.js";import{a as H,b as q,g as j,h as L,j as z,k as J,m as c,n as $}from"./ZCFWKPXL.js";import{a as N}from"./4O6ZYILT.js";import{a as m}from"./YEPGUNSV.js";import o from"./DP2UXNPJ.js";import n from"./HU57LQOA.js";import l from"./SKV3CQSZ.js";import"./WJQUE4DR.js";import i from"./ZRT4RJ62.js";import{a as B}from"./SAI7K4OO.js";import{a as _}from"./L5IRXOCJ.js";import{a as k}from"./LI3NOBHV.js";import h from"./ANB7YZCR.js";import f from"./3VFPLRD3.js";import e from"./E3RBRDUV.js";import{h as x}from"./FY7P5YLX.js";import"./IRDDLVT2.js";import a from"./TJHVEY7T.js";import{a as P}from"./LXME6MU5.js";import{B as R,P as d,Q as p,R as C,T as g,X as y,Y as v,_ as A,a as M,b as r,x as b}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([ae,w,{on:le,watch:re},,,,D,O,,,,,{k:K},,{a:S,b:U,c:G,d:Q}])=>{var u={...V,section:"section",editing:"editing",editingForm:"editing-form"},oe=M`:host{--arcgis-layer-list-visibility-icon: hidden}.editing-form{display:flex;height:100%;flex:1}.editing{padding-block:var(--calcite-space-sm);padding-inline:var(--calcite-space-sm)}`,W="nested",ne=".*\\S+.*",X="data-basemap-layer-type",he=O(ae),F=class extends C{constructor(){super(...arguments),this.#t=S(this),this._baseListRef=d(),this._referenceListRef=d(),this._editTitleInputRef=d(),this._layerFlowItemRef=d(),this._panelFlowItemRef=d(),this._rootFlowItemRef=d(),this._editingFlowItemRef=d(),this.#i=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${R()}`,this.#s=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this.messages=B(),this.viewModel=he(this),this.arcgisClose=k(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let l=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,o=c(e,this._allItems);if(!o?.sortable)return!1;let n=c(t,this._allItems),a=$(t),h=c(i,this._allItems),f=$(i),I=!!a&&!!f&&a===f,Z={selected:o,from:n,to:h},ee=t.group,te=i.group,ie=n?.layer?.type??"",se=h?.layer?.type??"",T=new Set(["map-image","catalog","knowledge-graph"]);return ee&&te&&typeof l=="function"?l(Z):I&&!T.has(ie)&&!T.has(se)&&o.layer?.type!=="sublayer"},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid??null},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid??null},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._clearActiveItem=()=>{this._activeItem=null},this._setCurrentActiveItem=e=>{this._activeItem=e},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(i=>i.classList?.contains(u.item));this._activeItem=c(t,this._allItems)??null},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._toggleEditingTitle=()=>{let e=!this.editingTitle;this.editingTitle=e,e?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0},this._formSubmit=e=>{e.preventDefault();let t=this._editTitleInputRef.value?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()},this._activeItem=null,this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.openedLayerLists=new w,this.autoDestroyDisabled=!1,this.baseFilterText="",this.baseItemCreatedFunction=this.viewModel.baseItemCreatedFunction,this.basemapTitle=this.viewModel.basemapTitle,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder="",this.headingLevel=2,this.hideBaseLayers=!1,this.hideCatalogLayerList=!1,this.hideHeading=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideReferenceLayers=!1,this.hideStatusIndicators=!1,this.icon="layers",this.layerTablesEnabled=new w(["knowledge-graph"]),this.listModeDisabled=this.viewModel.listModeDisabled,this.minFilterItems=q,this.openedLayers=new w,this.referenceFilterText="",this.referenceItemCreatedFunction=this.viewModel.referenceItemCreatedFunction,this.selectedItems=new w,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showEditTitleButton=!1,this.showErrors=!1,this.showFilter=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.view=this.viewModel.view,this.visibilityAppearance="default",this.arcgisBaseFilterChange=b(),this.arcgisOpenedLayersChange=b(),this.arcgisPropertyChange=x()("state"),this.arcgisReady=b(),this.arcgisReferenceFilterChange=b(),this.arcgisTriggerAction=D(()=>this.viewModel,"trigger-action")}static{this.properties={_activeItem:16,_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,openedLayerLists:16,_allItems:16,_visibleBaseItems:16,_visibleReferenceItems:16,_openedPanelItems:16,_totalBaseItems:16,_totalReferenceItems:16,_baseFilterEnabled:16,_referenceFilterEnabled:16,_renderedOpenLayerFlowItems:16,autoDestroyDisabled:5,baseFilterPredicate:0,baseFilterText:1,baseItemCreatedFunction:0,baseItems:32,basemapTitle:1,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:7,dragEnabled:5,editingTitle:5,filterPlaceholder:1,headingLevel:9,hideBaseLayers:5,hideCatalogLayerList:5,hideHeading:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideReferenceLayers:5,hideStatusIndicators:5,icon:1,knowledgeGraphOptions:0,label:1,layerTablesEnabled:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listModeDisabled:5,mapImageOptions:0,messageOverrides:0,minFilterItems:9,openedLayers:32,referenceElement:1,referenceFilterPredicate:0,referenceFilterText:1,referenceItems:32,referenceItemCreatedFunction:0,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showEditTitleButton:5,showErrors:5,showFilter:5,showTemporaryLayerIndicators:5,state:32,tableList:32,tileOptions:0,view:0,visibilityAppearance:1}}static{this.styles=[G,oe,U]}#t;#i;#s;get _allItems(){return this.referenceItems.concat(this.baseItems)}get _visibleBaseItems(){return this.baseItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _visibleReferenceItems(){return this.referenceItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _totalBaseItems(){return this.viewModel.baseItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.showFilter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){return this.openedLayers.toArray().map((e,t)=>this.#$(e,t===this.openedLayers.length-1))}get baseItems(){return this.viewModel.baseItems}get catalogLayerList(){return this._catalogLayerList}get referenceItems(){return this.viewModel.referenceItems}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this.#h(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[le(()=>this.openedLayers,"change",()=>{this.#n()},{initial:!0}),re(()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()],()=>j(this.selectedItems),{initial:!0})])}updated(){L(this._baseListRef.value,this.baseFilterPredicate,this.baseItems),L(this._referenceListRef.value,this.referenceFilterPredicate,this.referenceItems)}triggerAction(e,t){this.viewModel.triggerAction(e,t)}async#o(e,t){let i=this._layerListMap.get(e);if(i)return i;let s=e.type==="catalog"?await this.#c(e):await this._createTableList(e);return t.aborted||this._layerListMap.set(e,s),s}async#n(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this.#s?.abort();let s=new AbortController,{signal:l}=s;this.#s=s,e.forEach((a,h)=>{t.includes(h)||(a?.destroy?.(),e.delete(h))});let o=await Promise.all(t.map(a=>this.#o(a,l)));if(l.aborted)return;i.removeAll(),i.addMany(o);let n=i.at(-1);n?"catalogLayer"in n?(this._catalogLayerList=n,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=n):(this._catalogLayerList=void 0,this._tableList=void 0),this.arcgisOpenedLayersChange.emit()}#h(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async#c(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:s,minFilterItems:l,selectionMode:o,visibilityAppearance:n,layerTablesEnabled:a}=this;return v(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??s} .listItemCreatedFunction=${i?.listItemCreatedFunction} .minFilterItems=${i?.minFilterItems??l} .selectionMode=${i?.selectionMode??o} .visibilityAppearance=${i?.visibilityAppearance??n} .showErrors=${i?.showErrors??this.showErrors} .showFilter=${i?.showFilter??this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} @arcgisReady=${h=>h.stopPropagation()} .catalogLayer=${e} .layerTablesEnabled=${a} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}#d(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){let t=this.#d(e);return v(r`<arcgis-table-list-next .headingLevel=${t?.headingLevel??this.headingLevel} .selectionMode=${t?.selectionMode??this.selectionMode} .dragEnabled=${t?.dragEnabled??this.dragEnabled} .collapsed=${t?.collapsed} .filterPlaceholder=${t?.filterPlaceholder} .filterText=${t?.filterText} .icon=${t?.icon??void 0} .label=${t?.label??void 0} .listItemCreatedFunction=${t?.listItemCreatedFunction} .tables=${t?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${i=>i.stopPropagation()}></arcgis-table-list-next>`)}#m(e){e.open=!1,this._focusRootFlowItem=!0}#p({toEl:e,fromEl:t,dragEl:i,newIndex:s}){let l=c(i,this._allItems),o=e.hasAttribute("data-item")?c(e,this._allItems):null,n=t.hasAttribute("data-item")?c(t,this._allItems):null,a=Y(t),h=Y(e);s==null||!l||!a||!h||(this.viewModel.moveItem({targetItem:l,fromParentItem:n,toParentItem:o,newIndex:s,from:a,to:h}),K(this,l.uid,f=>f.parentElement?.closest("calcite-list")===e))}#g(e){let{fromEl:t,toEl:i,dragEl:s,oldIndex:l}=e;if(t!==i){s.remove();return}l==null||!t||!s||t.insertBefore(s,t.children[l])}_onCalciteListOrderChange(e){let t=this.#i,{toEl:i,fromEl:s,dragEl:l,newIndex:o}=e,n=t?.newIndex===o&&t?.dragEl===l&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||n)return;this.#i=e,this._selectedDragItemLayerUid=l.value.layer?.uid??null;let a=s,h=i;if(a===h){let f=Array.from(s.children).filter(I=>I?.matches("calcite-list-item")).map(I=>I.value.layer?.uid??"");this._sortLayers(a,f);return}this.#p({toEl:h,fromEl:a,dragEl:l,newIndex:o})}_sortLayers(e,t){if(e===this._referenceListRef.value||e===this._baseListRef.value){let s=e===this._baseListRef.value?this.view?.map?.basemap?.baseLayers:this.view?.map?.basemap?.referenceLayers;z(s,t);return}let i=c(e,this._allItems);i&&J(i,t)}#u(e){if(this.selectionMode==="none")return;let t=e.target.selectedItems.map(i=>c(i,this._allItems)).filter(Boolean);this.selectedItems.removeAll(),this.selectedItems.addMany(t)}#e(e,t){return!t||!e?t:(e.setFocus(),!1)}render(){let e={[_.hidden]:this.state==="loading",[_.disabled]:this.state==="disabled"};return r`<div class=${g(P(_.widget,_.panel,e))}>${this.#v()}${this.#y()}</div>`}#f(e){return e?r`<calcite-tooltip overlay-positioning=fixed .referenceElement=${this._tooltipReferenceMap.get(e.layer?.uid??"")}>${this.messages.layerIncompatibleTooltip}</calcite-tooltip>`:null}#a(e){if(e.incompatible)return this.#f(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this.#a(i));return t?.length?t:null}#y(){return this._visibleReferenceItems.concat(this._visibleBaseItems).toArray().map(e=>this.#a(e))}#l(e){return r`<div slot=message>${e}</div>`}#I(e,t){return this.hideNoItemsNotice?null:r`<div class=${g(u.itemMessage)}>${m(t,r`<calcite-notice icon=information kind=info open width=full>${this.#l(e)}</calcite-notice>`)}</div>`}#b(){return r`<div class=${g(u.editing)}><calcite-label>${this.messages.basemapTitle}<calcite-input .label=${this.messages.basemapTitle} name=basemaptitle .pattern=${ne} .placeholder=${this.messages.basemapTitle} required title=${this.messages.basemapTitle??y} type=text .value=${this.viewModel.basemapTitle??void 0} ${p(this._editTitleInputRef)}></calcite-input></calcite-label></div>`}#_(){return this.editingTitle?r`<calcite-flow-item .heading=${this.hideHeading?void 0:this.messages.basemapTitle} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemBack=${e=>{e.preventDefault(),this._toggleEditingTitle()}} ${p(this._editingFlowItemRef)}>${this.#b()}<calcite-button appearance=outline @click=${this._toggleEditingTitle} slot=footer-actions width=full>${this.messages.cancel}</calcite-button><calcite-button slot=footer-actions type=submit width=full>${this.messages.ok}</calcite-button></calcite-flow-item>`:null}#w(){return this.showEditTitleButton&&!this.editingTitle?r`<calcite-action icon=pencil @click=${this._toggleEditingTitle} slot=header-actions-end .text=${this.messages.edit??""} title=${this.messages.edit??y}></calcite-action>`:null}#v(){let e=[m("root-flow-item",r`<calcite-flow-item .closable=${this.showCloseButton} .closed=${this.closed} .collapsed=${this.collapsed} .collapsible=${this.showCollapseButton} .heading=${this.hideHeading?void 0:this.viewModel.basemapTitle??this.messages.componentLabel} .headingLevel=${this.headingLevel} .selected=${!this.editingTitle&&!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemClose=${()=>{this.closed=!0}} ${p(this._rootFlowItemRef)}>${this.#w()}${this.#E()}${this.#F()}</calcite-flow-item>`),this.#_(),this.#L(),this._renderedOpenLayerFlowItems];this._focusRootFlowItem=this.#e(this._rootFlowItemRef.value,this._focusRootFlowItem),this._focusEditingFlowItem=this.#e(this._editingFlowItemRef.value,this._focusEditingFlowItem);let t=m("root-flow",r`<calcite-flow>${e}</calcite-flow>`);return this.closed?null:this.editingTitle?r`<form class=${g(u.editingForm)} @submit=${this._formSubmit}>${t}</form>`:t}#L(){return N(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,l=()=>this.#m(i);return this._focusPanelFlowItem=this.#e(this._panelFlowItemRef.value,this._focusPanelFlowItem),r`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&t===this._openedPanelItems.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),l()}} ${p(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${l} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}#$(e,t){let i=e.title||this.messages.untitledLayer;return this._focusLayerFlowItem===e.uid&&(this._focusLayerFlowItem=this.#e(this._layerFlowItemRef.value,!0)?e.uid:null),m(e.uid,r`<calcite-flow-item data-layer-uid=${e.uid??y} .description=${i} .heading=${this.messages[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${s=>{s.preventDefault(),this.openedLayers.pop();let l=this.openedLayers.at(-1);l?this._focusLayerFlowItem=l.uid:this._focusRootFlowItem=!0}} ${p(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}#r(e,t,i){let s=t==="reference"?this._referenceFilterEnabled:this._baseFilterEnabled,l=t==="reference"?this.referenceFilterText:this.baseFilterText,o=(t==="reference"?this.messages.noReferenceLayers:this.messages.noBaseLayers)??this.messages.noItemsToDisplay??"",n=this.#t.selectionMode;return m(`block-${t}`,r`<calcite-block class=${g(u.section)} expandable expanded .heading=${t==="reference"?this.messages.referenceHeading:this.messages.baseHeading} .headingLevel=${this.headingLevel+1}>${e?.length?null:this.#I(o,t)}${m(`list-${t}`,r`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${a=>this._canMove(a,"pull")} .canPut=${a=>this._canMove(a,"put")} data-basemap-layer-type=${t??y} data-layer-type=${this._rootGroupUid??y} .displayMode=${W} .dragEnabled=${this.dragEnabled} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholder} .filterProps=${H} .filterText=${s?l:""} .group=${this._rootGroupUid} .label=${this.messages.componentLabel??""} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=border .selectionMode=${n} @calciteListChange=${this.#u} @calciteListDragEnd=${a=>this.#g(a.detail)} @calciteListFilter=${a=>{let h=a.currentTarget?.filterText??"";this[t==="reference"?"referenceFilterText":"baseFilterText"]=h,t==="base"?this.arcgisBaseFilterChange.emit():this.arcgisReferenceFilterChange.emit()}} @calciteListOrderChange=${a=>this._onCalciteListOrderChange(a.detail)} ${p(t==="reference"?this._referenceListRef:this._baseListRef)}>${e?.toArray().map(a=>this.#T(a,i))}${s&&!this.hideNoFilterResultsNotice?r`<div class=${g(u.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#l(o)}</calcite-notice></div>`:null}</calcite-list>`)}</calcite-block>`)}#F(){return this.hideBaseLayers?null:this.#r(this._visibleBaseItems,"base",this._visibleBaseItems.length===1)}#E(){return this.hideReferenceLayers?null:this.#r(this._visibleReferenceItems,"reference",!1)}#T(e,t,i,s){return m(e.uid,Q({activeItem:this._activeItem,canMove:this._canMove,css:u,displayMode:W,dragEnabled:this.dragEnabled&&!t,hideCatalogLayerList:this.hideCatalogLayerList,hideStatusIndicators:this.hideStatusIndicators,item:e,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,operationalItems:this._allItems,parent:i,parentTitles:s,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.#t.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,clearActiveItem:this._clearActiveItem,showErrors:this.showErrors,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};function Y(E){let e=E.closest(`[${X}]`)?.getAttribute(X);return e==="base"||e==="reference"?e:null}A("arcgis-basemap-layer-list-next",F);return F},"layerList/BasemapLayerListModel","core/Collection","core/reactiveUtils",a,e,f,h,i,l,n,o,s,t,u,w)
2
+ import w from"./J2K2LRII.js";import"./UIDNNWPD.js";import{a as V}from"./4L43F7HU.js";import u from"./WYX6WXW4.js";import t from"./PD2BELF2.js";import s from"./W6ILOTBW.js";import{a as H,b as q,g as j,h as L,j as z,k as J,m as c,n as $}from"./ZCFWKPXL.js";import{a as N}from"./4O6ZYILT.js";import{a as m}from"./YEPGUNSV.js";import o from"./DP2UXNPJ.js";import n from"./HU57LQOA.js";import l from"./3ZRVPLIZ.js";import"./WJQUE4DR.js";import i from"./ZRT4RJ62.js";import{a as B}from"./SAI7K4OO.js";import{a as _}from"./L5IRXOCJ.js";import{a as k}from"./LI3NOBHV.js";import h from"./ANB7YZCR.js";import f from"./3VFPLRD3.js";import e from"./E3RBRDUV.js";import{h as x}from"./FY7P5YLX.js";import"./IRDDLVT2.js";import a from"./TJHVEY7T.js";import{a as P}from"./LXME6MU5.js";import{B as R,P as d,Q as p,R as C,T as g,X as y,Y as v,_ as A,a as M,b as r,x as b}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([ae,w,{on:le,watch:re},,,,D,O,,,,,{k:K},,{a:S,b:U,c:G,d:Q}])=>{var u={...V,section:"section",editing:"editing",editingForm:"editing-form"},oe=M`:host{--arcgis-layer-list-visibility-icon: hidden}.editing-form{display:flex;height:100%;flex:1}.editing{padding-block:var(--calcite-space-sm);padding-inline:var(--calcite-space-sm)}`,W="nested",ne=".*\\S+.*",X="data-basemap-layer-type",he=O(ae),F=class extends C{constructor(){super(...arguments),this.#t=S(this),this._baseListRef=d(),this._referenceListRef=d(),this._editTitleInputRef=d(),this._layerFlowItemRef=d(),this._panelFlowItemRef=d(),this._rootFlowItemRef=d(),this._editingFlowItemRef=d(),this.#i=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${R()}`,this.#s=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this.messages=B(),this.viewModel=he(this),this.arcgisClose=k(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let l=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,o=c(e,this._allItems);if(!o?.sortable)return!1;let n=c(t,this._allItems),a=$(t),h=c(i,this._allItems),f=$(i),I=!!a&&!!f&&a===f,Z={selected:o,from:n,to:h},ee=t.group,te=i.group,ie=n?.layer?.type??"",se=h?.layer?.type??"",T=new Set(["map-image","catalog","knowledge-graph"]);return ee&&te&&typeof l=="function"?l(Z):I&&!T.has(ie)&&!T.has(se)&&o.layer?.type!=="sublayer"},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid??null},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid??null},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._clearActiveItem=()=>{this._activeItem=null},this._setCurrentActiveItem=e=>{this._activeItem=e},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(i=>i.classList?.contains(u.item));this._activeItem=c(t,this._allItems)??null},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._toggleEditingTitle=()=>{let e=!this.editingTitle;this.editingTitle=e,e?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0},this._formSubmit=e=>{e.preventDefault();let t=this._editTitleInputRef.value?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()},this._activeItem=null,this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.openedLayerLists=new w,this.autoDestroyDisabled=!1,this.baseFilterText="",this.baseItemCreatedFunction=this.viewModel.baseItemCreatedFunction,this.basemapTitle=this.viewModel.basemapTitle,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder="",this.headingLevel=2,this.hideBaseLayers=!1,this.hideCatalogLayerList=!1,this.hideHeading=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideReferenceLayers=!1,this.hideStatusIndicators=!1,this.icon="layers",this.layerTablesEnabled=new w(["knowledge-graph"]),this.listModeDisabled=this.viewModel.listModeDisabled,this.minFilterItems=q,this.openedLayers=new w,this.referenceFilterText="",this.referenceItemCreatedFunction=this.viewModel.referenceItemCreatedFunction,this.selectedItems=new w,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showEditTitleButton=!1,this.showErrors=!1,this.showFilter=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.view=this.viewModel.view,this.visibilityAppearance="default",this.arcgisBaseFilterChange=b(),this.arcgisOpenedLayersChange=b(),this.arcgisPropertyChange=x()("state"),this.arcgisReady=b(),this.arcgisReferenceFilterChange=b(),this.arcgisTriggerAction=D(()=>this.viewModel,"trigger-action")}static{this.properties={_activeItem:16,_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,openedLayerLists:16,_allItems:16,_visibleBaseItems:16,_visibleReferenceItems:16,_openedPanelItems:16,_totalBaseItems:16,_totalReferenceItems:16,_baseFilterEnabled:16,_referenceFilterEnabled:16,_renderedOpenLayerFlowItems:16,autoDestroyDisabled:5,baseFilterPredicate:0,baseFilterText:1,baseItemCreatedFunction:0,baseItems:32,basemapTitle:1,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:7,dragEnabled:5,editingTitle:5,filterPlaceholder:1,headingLevel:9,hideBaseLayers:5,hideCatalogLayerList:5,hideHeading:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideReferenceLayers:5,hideStatusIndicators:5,icon:1,knowledgeGraphOptions:0,label:1,layerTablesEnabled:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listModeDisabled:5,mapImageOptions:0,messageOverrides:0,minFilterItems:9,openedLayers:32,referenceElement:1,referenceFilterPredicate:0,referenceFilterText:1,referenceItems:32,referenceItemCreatedFunction:0,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showEditTitleButton:5,showErrors:5,showFilter:5,showTemporaryLayerIndicators:5,state:32,tableList:32,tileOptions:0,view:0,visibilityAppearance:1}}static{this.styles=[G,oe,U]}#t;#i;#s;get _allItems(){return this.referenceItems.concat(this.baseItems)}get _visibleBaseItems(){return this.baseItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _visibleReferenceItems(){return this.referenceItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _totalBaseItems(){return this.viewModel.baseItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.showFilter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){return this.openedLayers.toArray().map((e,t)=>this.#$(e,t===this.openedLayers.length-1))}get baseItems(){return this.viewModel.baseItems}get catalogLayerList(){return this._catalogLayerList}get referenceItems(){return this.viewModel.referenceItems}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this.#h(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[le(()=>this.openedLayers,"change",()=>{this.#n()},{initial:!0}),re(()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()],()=>j(this.selectedItems),{initial:!0})])}updated(){L(this._baseListRef.value,this.baseFilterPredicate,this.baseItems),L(this._referenceListRef.value,this.referenceFilterPredicate,this.referenceItems)}triggerAction(e,t){this.viewModel.triggerAction(e,t)}async#o(e,t){let i=this._layerListMap.get(e);if(i)return i;let s=e.type==="catalog"?await this.#c(e):await this._createTableList(e);return t.aborted||this._layerListMap.set(e,s),s}async#n(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this.#s?.abort();let s=new AbortController,{signal:l}=s;this.#s=s,e.forEach((a,h)=>{t.includes(h)||(a?.destroy?.(),e.delete(h))});let o=await Promise.all(t.map(a=>this.#o(a,l)));if(l.aborted)return;i.removeAll(),i.addMany(o);let n=i.at(-1);n?"catalogLayer"in n?(this._catalogLayerList=n,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=n):(this._catalogLayerList=void 0,this._tableList=void 0),this.arcgisOpenedLayersChange.emit()}#h(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async#c(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:s,minFilterItems:l,selectionMode:o,visibilityAppearance:n,layerTablesEnabled:a}=this;return v(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??s} .listItemCreatedFunction=${i?.listItemCreatedFunction} .minFilterItems=${i?.minFilterItems??l} .selectionMode=${i?.selectionMode??o} .visibilityAppearance=${i?.visibilityAppearance??n} .showErrors=${i?.showErrors??this.showErrors} .showFilter=${i?.showFilter??this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} @arcgisReady=${h=>h.stopPropagation()} .catalogLayer=${e} .layerTablesEnabled=${a} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}#d(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){let t=this.#d(e);return v(r`<arcgis-table-list-next .headingLevel=${t?.headingLevel??this.headingLevel} .selectionMode=${t?.selectionMode??this.selectionMode} .dragEnabled=${t?.dragEnabled??this.dragEnabled} .collapsed=${t?.collapsed} .filterPlaceholder=${t?.filterPlaceholder} .filterText=${t?.filterText} .icon=${t?.icon??void 0} .label=${t?.label??void 0} .listItemCreatedFunction=${t?.listItemCreatedFunction} .tables=${t?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${i=>i.stopPropagation()}></arcgis-table-list-next>`)}#m(e){e.open=!1,this._focusRootFlowItem=!0}#p({toEl:e,fromEl:t,dragEl:i,newIndex:s}){let l=c(i,this._allItems),o=e.hasAttribute("data-item")?c(e,this._allItems):null,n=t.hasAttribute("data-item")?c(t,this._allItems):null,a=Y(t),h=Y(e);s==null||!l||!a||!h||(this.viewModel.moveItem({targetItem:l,fromParentItem:n,toParentItem:o,newIndex:s,from:a,to:h}),K(this,l.uid,f=>f.parentElement?.closest("calcite-list")===e))}#g(e){let{fromEl:t,toEl:i,dragEl:s,oldIndex:l}=e;if(t!==i){s.remove();return}l==null||!t||!s||t.insertBefore(s,t.children[l])}_onCalciteListOrderChange(e){let t=this.#i,{toEl:i,fromEl:s,dragEl:l,newIndex:o}=e,n=t?.newIndex===o&&t?.dragEl===l&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||n)return;this.#i=e,this._selectedDragItemLayerUid=l.value.layer?.uid??null;let a=s,h=i;if(a===h){let f=Array.from(s.children).filter(I=>I?.matches("calcite-list-item")).map(I=>I.value.layer?.uid??"");this._sortLayers(a,f);return}this.#p({toEl:h,fromEl:a,dragEl:l,newIndex:o})}_sortLayers(e,t){if(e===this._referenceListRef.value||e===this._baseListRef.value){let s=e===this._baseListRef.value?this.view?.map?.basemap?.baseLayers:this.view?.map?.basemap?.referenceLayers;z(s,t);return}let i=c(e,this._allItems);i&&J(i,t)}#u(e){if(this.selectionMode==="none")return;let t=e.target.selectedItems.map(i=>c(i,this._allItems)).filter(Boolean);this.selectedItems.removeAll(),this.selectedItems.addMany(t)}#e(e,t){return!t||!e?t:(e.setFocus(),!1)}render(){let e={[_.hidden]:this.state==="loading",[_.disabled]:this.state==="disabled"};return r`<div class=${g(P(_.widget,_.panel,e))}>${this.#v()}${this.#y()}</div>`}#f(e){return e?r`<calcite-tooltip overlay-positioning=fixed .referenceElement=${this._tooltipReferenceMap.get(e.layer?.uid??"")}>${this.messages.layerIncompatibleTooltip}</calcite-tooltip>`:null}#a(e){if(e.incompatible)return this.#f(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this.#a(i));return t?.length?t:null}#y(){return this._visibleReferenceItems.concat(this._visibleBaseItems).toArray().map(e=>this.#a(e))}#l(e){return r`<div slot=message>${e}</div>`}#I(e,t){return this.hideNoItemsNotice?null:r`<div class=${g(u.itemMessage)}>${m(t,r`<calcite-notice icon=information kind=info open width=full>${this.#l(e)}</calcite-notice>`)}</div>`}#b(){return r`<div class=${g(u.editing)}><calcite-label>${this.messages.basemapTitle}<calcite-input .label=${this.messages.basemapTitle} name=basemaptitle .pattern=${ne} .placeholder=${this.messages.basemapTitle} required title=${this.messages.basemapTitle??y} type=text .value=${this.viewModel.basemapTitle??void 0} ${p(this._editTitleInputRef)}></calcite-input></calcite-label></div>`}#_(){return this.editingTitle?r`<calcite-flow-item .heading=${this.hideHeading?void 0:this.messages.basemapTitle} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemBack=${e=>{e.preventDefault(),this._toggleEditingTitle()}} ${p(this._editingFlowItemRef)}>${this.#b()}<calcite-button appearance=outline @click=${this._toggleEditingTitle} slot=footer-actions width=full>${this.messages.cancel}</calcite-button><calcite-button slot=footer-actions type=submit width=full>${this.messages.ok}</calcite-button></calcite-flow-item>`:null}#w(){return this.showEditTitleButton&&!this.editingTitle?r`<calcite-action icon=pencil @click=${this._toggleEditingTitle} slot=header-actions-end .text=${this.messages.edit??""} title=${this.messages.edit??y}></calcite-action>`:null}#v(){let e=[m("root-flow-item",r`<calcite-flow-item .closable=${this.showCloseButton} .closed=${this.closed} .collapsed=${this.collapsed} .collapsible=${this.showCollapseButton} .heading=${this.hideHeading?void 0:this.viewModel.basemapTitle??this.messages.componentLabel} .headingLevel=${this.headingLevel} .selected=${!this.editingTitle&&!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemClose=${()=>{this.closed=!0}} ${p(this._rootFlowItemRef)}>${this.#w()}${this.#E()}${this.#F()}</calcite-flow-item>`),this.#_(),this.#L(),this._renderedOpenLayerFlowItems];this._focusRootFlowItem=this.#e(this._rootFlowItemRef.value,this._focusRootFlowItem),this._focusEditingFlowItem=this.#e(this._editingFlowItemRef.value,this._focusEditingFlowItem);let t=m("root-flow",r`<calcite-flow>${e}</calcite-flow>`);return this.closed?null:this.editingTitle?r`<form class=${g(u.editingForm)} @submit=${this._formSubmit}>${t}</form>`:t}#L(){return N(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,l=()=>this.#m(i);return this._focusPanelFlowItem=this.#e(this._panelFlowItemRef.value,this._focusPanelFlowItem),r`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&t===this._openedPanelItems.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),l()}} ${p(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${l} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}#$(e,t){let i=e.title||this.messages.untitledLayer;return this._focusLayerFlowItem===e.uid&&(this._focusLayerFlowItem=this.#e(this._layerFlowItemRef.value,!0)?e.uid:null),m(e.uid,r`<calcite-flow-item data-layer-uid=${e.uid??y} .description=${i} .heading=${this.messages[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${s=>{s.preventDefault(),this.openedLayers.pop();let l=this.openedLayers.at(-1);l?this._focusLayerFlowItem=l.uid:this._focusRootFlowItem=!0}} ${p(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}#r(e,t,i){let s=t==="reference"?this._referenceFilterEnabled:this._baseFilterEnabled,l=t==="reference"?this.referenceFilterText:this.baseFilterText,o=(t==="reference"?this.messages.noReferenceLayers:this.messages.noBaseLayers)??this.messages.noItemsToDisplay??"",n=this.#t.selectionMode;return m(`block-${t}`,r`<calcite-block class=${g(u.section)} expandable expanded .heading=${t==="reference"?this.messages.referenceHeading:this.messages.baseHeading} .headingLevel=${this.headingLevel+1}>${e?.length?null:this.#I(o,t)}${m(`list-${t}`,r`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${a=>this._canMove(a,"pull")} .canPut=${a=>this._canMove(a,"put")} data-basemap-layer-type=${t??y} data-layer-type=${this._rootGroupUid??y} .displayMode=${W} .dragEnabled=${this.dragEnabled} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholder} .filterProps=${H} .filterText=${s?l:""} .group=${this._rootGroupUid} .label=${this.messages.componentLabel??""} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=border .selectionMode=${n} @calciteListChange=${this.#u} @calciteListDragEnd=${a=>this.#g(a.detail)} @calciteListFilter=${a=>{let h=a.currentTarget?.filterText??"";this[t==="reference"?"referenceFilterText":"baseFilterText"]=h,t==="base"?this.arcgisBaseFilterChange.emit():this.arcgisReferenceFilterChange.emit()}} @calciteListOrderChange=${a=>this._onCalciteListOrderChange(a.detail)} ${p(t==="reference"?this._referenceListRef:this._baseListRef)}>${e?.toArray().map(a=>this.#T(a,i))}${s&&!this.hideNoFilterResultsNotice?r`<div class=${g(u.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#l(o)}</calcite-notice></div>`:null}</calcite-list>`)}</calcite-block>`)}#F(){return this.hideBaseLayers?null:this.#r(this._visibleBaseItems,"base",this._visibleBaseItems.length===1)}#E(){return this.hideReferenceLayers?null:this.#r(this._visibleReferenceItems,"reference",!1)}#T(e,t,i,s){return m(e.uid,Q({activeItem:this._activeItem,canMove:this._canMove,css:u,displayMode:W,dragEnabled:this.dragEnabled&&!t,hideCatalogLayerList:this.hideCatalogLayerList,hideStatusIndicators:this.hideStatusIndicators,item:e,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,operationalItems:this._allItems,parent:i,parentTitles:s,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.#t.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,clearActiveItem:this._clearActiveItem,showErrors:this.showErrors,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};function Y(E){let e=E.closest(`[${X}]`)?.getAttribute(X);return e==="base"||e==="reference"?e:null}A("arcgis-basemap-layer-list-next",F);return F},"layerList/BasemapLayerListModel","core/Collection","core/reactiveUtils",a,e,f,h,i,l,n,o,s,t,u,w)