@esri/calcite-components 5.2.0-next.73 → 5.2.0-next.75

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 (175) hide show
  1. package/dist/cdn/{UMFPRIO5.js → 2EVIVXPY.js} +1 -1
  2. package/dist/cdn/{F3DHYXBJ.js → 2HNLPWAZ.js} +1 -1
  3. package/dist/cdn/{TMBIYRNE.js → 2JON7V25.js} +1 -1
  4. package/dist/cdn/{TJTXJPXF.js → 3ACOLSJX.js} +1 -1
  5. package/dist/cdn/{KV5F5ZCM.js → 3PDMOUMJ.js} +1 -1
  6. package/dist/cdn/3QPETC2U.js +2 -0
  7. package/dist/cdn/{PTUZYFQZ.js → 43HX7HK2.js} +1 -1
  8. package/dist/cdn/{2UDZD2YP.js → 4B4BJKV5.js} +1 -1
  9. package/dist/cdn/{SB6PL5QW.js → 4H6E3X4V.js} +1 -1
  10. package/dist/cdn/{E54P2DRV.js → 4Q2YPKWL.js} +1 -1
  11. package/dist/cdn/{LTX5ZMJB.js → 4Z46HUN4.js} +1 -1
  12. package/dist/cdn/{CVB6ZHVV.js → 5CEAARGW.js} +1 -1
  13. package/dist/cdn/5G3EOQAP.js +2 -0
  14. package/dist/cdn/{NSUDCGOY.js → 5M65CFLH.js} +1 -1
  15. package/dist/cdn/{LVJWQOHV.js → 5UMOVU64.js} +1 -1
  16. package/dist/cdn/{N7GZQ65Q.js → 6AWKEEOF.js} +1 -1
  17. package/dist/cdn/{UFQCAQTX.js → 6FAJVSD4.js} +1 -1
  18. package/dist/cdn/{MY6ETMY7.js → 6TXKNTJP.js} +1 -1
  19. package/dist/cdn/{OYWZ3HSX.js → 7SFPVGCD.js} +1 -1
  20. package/dist/cdn/{XYF5NWA5.js → 7SSBLKFA.js} +1 -1
  21. package/dist/cdn/{EMXEIY5M.js → AEB4Z223.js} +1 -1
  22. package/dist/cdn/{PVZXQUV4.js → AEDC7G5P.js} +1 -1
  23. package/dist/cdn/{7XJCLPQY.js → AKJ5VALG.js} +1 -1
  24. package/dist/cdn/{7TR4VZRI.js → AZ5ZWXXK.js} +1 -1
  25. package/dist/cdn/{KGZROIYV.js → BKFLSVV4.js} +1 -1
  26. package/dist/cdn/{OGNNH3FL.js → BRUF7YDC.js} +1 -1
  27. package/dist/cdn/{GPDE7QUX.js → BX4EQI4L.js} +1 -1
  28. package/dist/cdn/{IJTMOK2Y.js → BZXAGXQF.js} +1 -1
  29. package/dist/cdn/{WY3ZSN62.js → CA2GGRFJ.js} +1 -1
  30. package/dist/cdn/{BU26H7TY.js → CIL7O6L3.js} +1 -1
  31. package/dist/cdn/{KUUN6CZ2.js → CMB2V5X6.js} +1 -1
  32. package/dist/cdn/{O2IAGFTJ.js → CVTDVXWE.js} +1 -1
  33. package/dist/cdn/D7R7VXSW.js +2 -0
  34. package/dist/cdn/{M6Y7G7TI.js → DGXBVQ2S.js} +1 -1
  35. package/dist/cdn/{PL33IT4N.js → DJSK2UFO.js} +1 -1
  36. package/dist/cdn/{EBP34OAN.js → DOV6DBQM.js} +1 -1
  37. package/dist/cdn/{JVUECPJ3.js → DXBCV4IS.js} +1 -1
  38. package/dist/cdn/{27HNROXL.js → EF6OC5UR.js} +1 -1
  39. package/dist/cdn/{MYJC2SUN.js → EFUMOZET.js} +1 -1
  40. package/dist/cdn/{RCGAGO2L.js → ETFYJGST.js} +1 -1
  41. package/dist/cdn/{JGZ5HI3M.js → F5VR7FU6.js} +1 -1
  42. package/dist/cdn/{MFMYF3MV.js → F7QRXMLE.js} +1 -1
  43. package/dist/cdn/{R2VBAFUT.js → FMIN4FXZ.js} +1 -1
  44. package/dist/cdn/{ZWS37XF5.js → FOHVMKTS.js} +1 -1
  45. package/dist/cdn/{J3A2CLFG.js → FOMZG2UP.js} +1 -1
  46. package/dist/cdn/FWWS7ZQF.js +2 -0
  47. package/dist/cdn/{XPKPBZJW.js → G64R54P5.js} +1 -1
  48. package/dist/cdn/{NO2V47RO.js → GBUMWAMI.js} +1 -1
  49. package/dist/cdn/{ZIEKM6XI.js → GSCAQKUF.js} +1 -1
  50. package/dist/cdn/{XZ42HAJX.js → GWODLNHO.js} +1 -1
  51. package/dist/cdn/{BP6Y7HKI.js → GXDN4MYU.js} +1 -1
  52. package/dist/cdn/{ZNYK5MCS.js → HC7XTIHJ.js} +1 -1
  53. package/dist/cdn/{DV236Z5I.js → HICNQGNG.js} +1 -1
  54. package/dist/cdn/{6AFBJZ62.js → HVC2AYWQ.js} +1 -1
  55. package/dist/cdn/HX2PSDYI.js +2 -0
  56. package/dist/cdn/{NBXEGT3C.js → I55LFKXN.js} +1 -1
  57. package/dist/cdn/{37IBLWMI.js → I5K6EDCU.js} +1 -1
  58. package/dist/cdn/{KUYDAK3T.js → I77BH2GV.js} +1 -1
  59. package/dist/cdn/{T3ERR4KQ.js → IBYTB33B.js} +1 -1
  60. package/dist/cdn/{G6FFXLGN.js → IGSMC35J.js} +1 -1
  61. package/dist/cdn/{F7TDVFPH.js → IQUNIZ2X.js} +1 -1
  62. package/dist/cdn/{QK2E2WQ7.js → ISN5KGTB.js} +1 -1
  63. package/dist/cdn/IU7DS3DV.js +2 -0
  64. package/dist/cdn/{DHBPDNMK.js → IWWJYWY5.js} +1 -1
  65. package/dist/cdn/{GDH5QPMM.js → IZ3W6AJK.js} +1 -1
  66. package/dist/cdn/{MEPD7AAA.js → J3BY5AI6.js} +1 -1
  67. package/dist/cdn/{CZSBH6BX.js → JBE7YDVT.js} +1 -1
  68. package/dist/cdn/{NU4NLL5M.js → JBJEESIK.js} +1 -1
  69. package/dist/cdn/{IC52NBVJ.js → JIHLETWF.js} +1 -1
  70. package/dist/cdn/{IP2LRMRJ.js → JVYBHUAO.js} +1 -1
  71. package/dist/cdn/{JUF6DRL4.js → JXLVLVWY.js} +1 -1
  72. package/dist/cdn/{HHRWTZN5.js → KQAR33SR.js} +1 -1
  73. package/dist/cdn/KXJ7DTCZ.js +2 -0
  74. package/dist/cdn/{TJDIFYCD.js → KYIA6VGH.js} +1 -1
  75. package/dist/cdn/{LHNKXPQI.js → LJP2D2HY.js} +1 -1
  76. package/dist/cdn/{KFMNOZ6R.js → LKMH2ETP.js} +1 -1
  77. package/dist/cdn/{R6EUALEA.js → LSLJSKX3.js} +1 -1
  78. package/dist/cdn/{NXBIICWN.js → M3CH5PK6.js} +1 -1
  79. package/dist/cdn/{EV46XMMW.js → MB3FX7OZ.js} +1 -1
  80. package/dist/cdn/{ESCLMVTY.js → MCGGJUT4.js} +1 -1
  81. package/dist/cdn/{EOPSC6K4.js → MD3RQ5I2.js} +1 -1
  82. package/dist/cdn/{NA63GTI2.js → MDB3SXD6.js} +1 -1
  83. package/dist/cdn/{Z6GATQTZ.js → ME56NZHJ.js} +1 -1
  84. package/dist/cdn/{Q5DBIC7O.js → MIQP6HEK.js} +1 -1
  85. package/dist/cdn/{UPEVGJT2.js → MR7JIUCW.js} +1 -1
  86. package/dist/cdn/{VWKWCOKY.js → MYU5YT5E.js} +1 -1
  87. package/dist/cdn/{DGXCJ3T4.js → N6WG5R5S.js} +1 -1
  88. package/dist/cdn/{JIDFBYGO.js → N7X4APJV.js} +1 -1
  89. package/dist/cdn/{42IJUBWL.js → NO7F4GKY.js} +1 -1
  90. package/dist/cdn/{UDPEKWZE.js → NPJL4MSJ.js} +1 -1
  91. package/dist/cdn/{BRFDEZK3.js → NPVTJ3JM.js} +1 -1
  92. package/dist/cdn/{DPONETMO.js → NURDERM3.js} +1 -1
  93. package/dist/cdn/{VO5DIJT5.js → OBJT5ODS.js} +1 -1
  94. package/dist/cdn/{MCCTYHDW.js → OIIMG6T7.js} +1 -1
  95. package/dist/cdn/{OLP5HQL5.js → OSWIVMFU.js} +1 -1
  96. package/dist/cdn/{YLHGWJTL.js → OVD3IAAV.js} +1 -1
  97. package/dist/cdn/{KMIF3RZT.js → P22VNKPY.js} +1 -1
  98. package/dist/cdn/{LSLAO4DI.js → P4UBML72.js} +1 -1
  99. package/dist/cdn/PC4LZZZM.js +2 -0
  100. package/dist/cdn/{GBM4SNW6.js → PW7YMRBF.js} +1 -1
  101. package/dist/cdn/{EN2QWFX7.js → PXUU3PWL.js} +1 -1
  102. package/dist/cdn/{6PZPVFJ4.js → Q4MMPR4P.js} +1 -1
  103. package/dist/cdn/{C6QPGVOZ.js → Q7RRARYY.js} +1 -1
  104. package/dist/cdn/{KWXXGQXB.js → QEZ3GMQZ.js} +1 -1
  105. package/dist/cdn/{X4KVBZ5L.js → QNGVIHP6.js} +1 -1
  106. package/dist/cdn/{Z5N3LBKA.js → RAA3PI43.js} +1 -1
  107. package/dist/cdn/{BAHV3ZHN.js → RBO5QXOC.js} +1 -1
  108. package/dist/cdn/{FQGNWXNF.js → RET2UHOB.js} +1 -1
  109. package/dist/cdn/{K7R7TG7S.js → RKI7SYTC.js} +1 -1
  110. package/dist/cdn/{WLL5HWCU.js → RL6LR5RX.js} +1 -1
  111. package/dist/cdn/RNHHKZNH.js +2 -0
  112. package/dist/cdn/{XXSF7VUB.js → RQONITLI.js} +2 -2
  113. package/dist/cdn/{VAXEDXEI.js → RYQEEAQF.js} +1 -1
  114. package/dist/cdn/{OO3ODDZR.js → SABXQJA7.js} +1 -1
  115. package/dist/cdn/{XHLKZS5H.js → T5UPMLEC.js} +1 -1
  116. package/dist/cdn/{2TAEKK5A.js → TDHR3F7M.js} +1 -1
  117. package/dist/cdn/{T2JZUTA2.js → TLIBVBYQ.js} +1 -1
  118. package/dist/cdn/{XX2SMR2I.js → UAH66PZO.js} +1 -1
  119. package/dist/cdn/{ENG5Q5V4.js → UDFJY3B5.js} +1 -1
  120. package/dist/cdn/{JZV6KL3B.js → UJ7BSYGW.js} +1 -1
  121. package/dist/cdn/{I6AL3D3S.js → UJXQEJWS.js} +1 -1
  122. package/dist/cdn/{RPBZTWMO.js → VJKMBHLN.js} +1 -1
  123. package/dist/cdn/{VS4TMANV.js → VJPUBMZS.js} +1 -1
  124. package/dist/cdn/{SJMEROX5.js → VLRX2MEB.js} +1 -1
  125. package/dist/cdn/VQUGMT54.js +2 -0
  126. package/dist/cdn/{AEFZHKKB.js → W2ROLCMV.js} +1 -1
  127. package/dist/cdn/{WZMO5H25.js → WPVOJ3GU.js} +1 -1
  128. package/dist/cdn/{QWYF4437.js → WV6SHUD6.js} +1 -1
  129. package/dist/cdn/{TV4VNLIN.js → WXBPLXQQ.js} +1 -1
  130. package/dist/cdn/{ERYHL6TK.js → XGJC7SXI.js} +1 -1
  131. package/dist/cdn/{FPAZVBXQ.js → XIIT6OKF.js} +1 -1
  132. package/dist/cdn/{R5OGQTQN.js → XPCQTWGI.js} +1 -1
  133. package/dist/cdn/{EANNBRYE.js → XTO3FV4Q.js} +1 -1
  134. package/dist/cdn/{YFSTYNAI.js → Y47NEC7L.js} +1 -1
  135. package/dist/cdn/{MGJSVHPX.js → Y4B25ZAA.js} +1 -1
  136. package/dist/cdn/{D5JTUVVX.js → Y6IWUBYT.js} +1 -1
  137. package/dist/cdn/{TZFQB5VD.js → YC7RH6YT.js} +1 -1
  138. package/dist/cdn/{FBKGJNTW.js → YDUTUT75.js} +1 -1
  139. package/dist/cdn/{6XKU35HH.js → YOSK7NP5.js} +1 -1
  140. package/dist/cdn/{UC2CJTKV.js → Z5EPV3FM.js} +1 -1
  141. package/dist/cdn/{YYUKAHFC.js → ZOFL5S4B.js} +1 -1
  142. package/dist/cdn/assets/icon/linkedChart16.json +1 -0
  143. package/dist/cdn/assets/icon/linkedChart24.json +1 -0
  144. package/dist/cdn/assets/icon/linkedChart32.json +1 -0
  145. package/dist/cdn/index.js +2 -2
  146. package/dist/cdn/main.css +1 -1
  147. package/dist/chunks/dom.js +7 -6
  148. package/dist/chunks/runtime.js +4 -8
  149. package/dist/components/calcite-autocomplete/customElement.js +1 -1
  150. package/dist/components/calcite-avatar/customElement.js +2 -5
  151. package/dist/components/calcite-dropdown-item/customElement.js +2 -1
  152. package/dist/components/calcite-filter/customElement.js +1 -1
  153. package/dist/components/calcite-input-date-picker/customElement.js +1 -1
  154. package/dist/components/calcite-input-time-picker/customElement.js +1 -1
  155. package/dist/components/calcite-progress/customElement.js +1 -1
  156. package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
  157. package/dist/components/calcite-slider/customElement.js +1 -1
  158. package/dist/components/calcite-time-picker/customElement.js +1 -1
  159. package/dist/components/calcite-tree/customElement.js +3 -1
  160. package/dist/components/calcite-tree-item/customElement.js +5 -3
  161. package/dist/docs/api.json +1 -1
  162. package/dist/docs/docs.json +1 -1
  163. package/dist/docs/vscode.html-custom-data.json +1 -1
  164. package/dist/docs/web-types.json +1 -1
  165. package/package.json +5 -5
  166. package/dist/cdn/3OUBYTMI.js +0 -2
  167. package/dist/cdn/6LCXL73P.js +0 -2
  168. package/dist/cdn/AY5A2Z44.js +0 -2
  169. package/dist/cdn/H4YNVFCF.js +0 -2
  170. package/dist/cdn/JPZVKCWC.js +0 -2
  171. package/dist/cdn/L72YHWC6.js +0 -2
  172. package/dist/cdn/NYYCAHBH.js +0 -2
  173. package/dist/cdn/OM3JPG3O.js +0 -2
  174. package/dist/cdn/RAGBJU2L.js +0 -2
  175. package/dist/cdn/XTZZ36I5.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as A,c as k}from"./WY3ZSN62.js";import{a as g}from"./VI7SBYXT.js";import{a as y}from"./XPKPBZJW.js";import{b as E}from"./JL43QOWW.js";import"./24ZPXFO2.js";import"./XX43OXTK.js";import{c as v}from"./77M5NVCW.js";import"./VUYX7MNO.js";import{a as x}from"./GBM4SNW6.js";import"./ZWPNZ5XW.js";import{e as f}from"./37IBLWMI.js";import{C as i,y as b}from"./3OUBYTMI.js";import{E as u,F as c,O as h,R as m,g as p,h as s,p as o}from"./XXSF7VUB.js";var T={actionGroupEnd:"action-group--end",container:"container"},D={expandTooltip:"expand-tooltip"},L=p`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-pad-gap: var(--calcite-action-pad-items-space, var(--calcite-spacing-xxs));--calcite-internal-action-pad-padding: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-pad-gap: var(--calcite-action-pad-items-space, var(--calcite-spacing-sm));--calcite-internal-action-pad-padding: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-pad-gap: var(--calcite-action-pad-items-space, var(--calcite-space-sm-plus));--calcite-internal-action-pad-padding: var(--calcite-spacing-sm-plus)}:host{display:block}@keyframes in{0%{opacity:0}to{opacity:1}}:host{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:var(--calcite-action-pad-corner-radius, .125rem);background:transparent}:host([expanded][layout=vertical]) .container{max-inline-size:var(--calcite-action-pad-expanded-max-width, auto)}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:1px;padding-block-end:var(--calcite-internal-action-pad-padding)}.container{display:inline-flex;flex-direction:column;overflow:hidden;box-shadow:var(--calcite-shadow-md);border-radius:calc(var(--calcite-action-pad-corner-radius, .125rem) * 2);background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));gap:var(--calcite-internal-action-pad-gap);padding:var(--calcite-internal-action-pad-padding)}.action-group--bottom{flex-grow:1;justify-content:flex-end;padding-block-end:0px}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]) .container .action-group--bottom{padding:0}:host([layout=horizontal]) .container ::slotted(calcite-action-group:not(:last-of-type)){border-inline-end-width:1px;padding-inline-end:var(--calcite-internal-action-pad-padding)}:host([hidden]){display:none}[hidden]{display:none}`,l=class extends u{constructor(){super(),this.actions=[],this.direction=f(),this.mutationObserver=g("mutation",()=>this.mutationObserverHandler()),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionPadToggle.emit()},this.messages=y({blocking:!0}),this.focusSetter=x()(this),this.expandDisabled=!1,this.expanded=!1,this.layout="vertical",this.overlayPositioning="absolute",this.scale="m",this.selectionAppearance="neutral",this.calciteActionPadCollapse=o({cancelable:!1}),this.calciteActionPadExpand=o({cancelable:!1}),this.calciteActionPadToggle=o({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler),this.listen("keydown",this.handleKeyDown)}static{this.properties={expandTooltip:[16,{},{state:!0}],actionsEndGroupLabel:1,expandDisabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=L}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.updateActions(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}async load(){h.deprecated("component",{component:this,name:"action-pad",removalVersion:5,suggested:"action-bar"})}willUpdate(e){e.has("expanded")&&this.hasUpdated&&A({el:this.el,expanded:this.expanded}),e.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.updateGroups(),e.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteActionPadExpand.emit():this.calciteActionPadCollapse.emit()),e.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="neutral")&&this.updateActions()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}actionMenuOpenHandler(e){if(e.target.menuOpen){let t=e.composedPath();this.actionGroups?.forEach(a=>{t.includes(a)||(a.menuOpen=!1)})}}updateGroups(){let e=Array.from(this.el.querySelectorAll("calcite-action-group"));this.actionGroups=e,this.setGroupLayout(e)}setGroupLayout(e){e.forEach(t=>t.layout=this.layout)}handleDefaultSlotChange(){this.updateGroups(),this.queryAndStoreActions(),this.updateActions()}handleTooltipSlotChange(e){let t=b(e).filter(E);this.expandTooltip=t[0]}handleKeyDown(e){this.queryAndStoreActions();let t=this.actions.filter(n=>!n.disabled),a=document.activeElement;if(!(!v(a)||!t.includes(a)))switch(e.key){case"ArrowRight":case"ArrowDown":i(t,a,"next",!0),e.preventDefault();break;case"ArrowLeft":case"ArrowUp":i(t,a,"previous",!0),e.preventDefault();break;case"Home":i(t,a,"first",!0),e.preventDefault();break;case"End":i(t,a,"last",!0),e.preventDefault();break;case"Tab":this.updateTabIndexOfItems(a);break}}updateActions(){this.actions.forEach(e=>{e.selectionAppearance=this.selectionAppearance})}updateTabIndexOfItems(e){this.actions.forEach(t=>{let a=!t.disabled&&t===e?0:-1;a===0?t.removeAttribute("tabindex"):t.tabIndex=a})}queryAndStoreActions(){this.actions=Array.from(this.el.querySelectorAll("calcite-action"))}mutationObserverHandler(){this.updateGroups(),this.queryAndStoreActions(),this.updateActions()}renderBottomActionGroup(){let{expanded:e,expandDisabled:t,messages:a,el:n,position:w,toggleExpand:S,scale:r,layout:G,actionsEndGroupLabel:O,overlayPositioning:C}=this,d=t?null:k({collapseLabel:a.collapseLabel,collapseText:a.collapse,direction:this.direction,el:n,expanded:e,expandLabel:a.expandLabel,expandText:a.expand,position:w,scale:r,toggle:S,tooltip:this.expandTooltip});return d?s`<calcite-action-group class=${c(T.actionGroupEnd)} .label=${O} .layout=${G} .overlayPositioning=${C} .scale=${r}><slot name=${D.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>${d}</calcite-action-group>`:null}render(){return s`<div class=${c(T.container)}><slot @slotchange=${this.handleDefaultSlotChange}></slot>${this.renderBottomActionGroup()}</div>`}};m("calcite-action-pad",l);export{l as ActionPad};
2
+ import{b as A,c as k}from"./CA2GGRFJ.js";import{a as g}from"./VI7SBYXT.js";import{a as y}from"./G64R54P5.js";import{b as E}from"./JL43QOWW.js";import"./24ZPXFO2.js";import"./XX43OXTK.js";import{c as v}from"./77M5NVCW.js";import"./VUYX7MNO.js";import{a as x}from"./PW7YMRBF.js";import"./ZWPNZ5XW.js";import{e as f}from"./I5K6EDCU.js";import{C as i,y as b}from"./3QPETC2U.js";import{E as u,F as c,O as h,R as m,g as p,h as s,p as o}from"./RQONITLI.js";var T={actionGroupEnd:"action-group--end",container:"container"},D={expandTooltip:"expand-tooltip"},L=p`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-pad-gap: var(--calcite-action-pad-items-space, var(--calcite-spacing-xxs));--calcite-internal-action-pad-padding: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-pad-gap: var(--calcite-action-pad-items-space, var(--calcite-spacing-sm));--calcite-internal-action-pad-padding: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-pad-gap: var(--calcite-action-pad-items-space, var(--calcite-space-sm-plus));--calcite-internal-action-pad-padding: var(--calcite-spacing-sm-plus)}:host{display:block}@keyframes in{0%{opacity:0}to{opacity:1}}:host{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:var(--calcite-action-pad-corner-radius, .125rem);background:transparent}:host([expanded][layout=vertical]) .container{max-inline-size:var(--calcite-action-pad-expanded-max-width, auto)}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:1px;padding-block-end:var(--calcite-internal-action-pad-padding)}.container{display:inline-flex;flex-direction:column;overflow:hidden;box-shadow:var(--calcite-shadow-md);border-radius:calc(var(--calcite-action-pad-corner-radius, .125rem) * 2);background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));gap:var(--calcite-internal-action-pad-gap);padding:var(--calcite-internal-action-pad-padding)}.action-group--bottom{flex-grow:1;justify-content:flex-end;padding-block-end:0px}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]) .container .action-group--bottom{padding:0}:host([layout=horizontal]) .container ::slotted(calcite-action-group:not(:last-of-type)){border-inline-end-width:1px;padding-inline-end:var(--calcite-internal-action-pad-padding)}:host([hidden]){display:none}[hidden]{display:none}`,l=class extends u{constructor(){super(),this.actions=[],this.direction=f(),this.mutationObserver=g("mutation",()=>this.mutationObserverHandler()),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionPadToggle.emit()},this.messages=y({blocking:!0}),this.focusSetter=x()(this),this.expandDisabled=!1,this.expanded=!1,this.layout="vertical",this.overlayPositioning="absolute",this.scale="m",this.selectionAppearance="neutral",this.calciteActionPadCollapse=o({cancelable:!1}),this.calciteActionPadExpand=o({cancelable:!1}),this.calciteActionPadToggle=o({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler),this.listen("keydown",this.handleKeyDown)}static{this.properties={expandTooltip:[16,{},{state:!0}],actionsEndGroupLabel:1,expandDisabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=L}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.updateActions(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}async load(){h.deprecated("component",{component:this,name:"action-pad",removalVersion:5,suggested:"action-bar"})}willUpdate(e){e.has("expanded")&&this.hasUpdated&&A({el:this.el,expanded:this.expanded}),e.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.updateGroups(),e.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteActionPadExpand.emit():this.calciteActionPadCollapse.emit()),e.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="neutral")&&this.updateActions()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}actionMenuOpenHandler(e){if(e.target.menuOpen){let t=e.composedPath();this.actionGroups?.forEach(a=>{t.includes(a)||(a.menuOpen=!1)})}}updateGroups(){let e=Array.from(this.el.querySelectorAll("calcite-action-group"));this.actionGroups=e,this.setGroupLayout(e)}setGroupLayout(e){e.forEach(t=>t.layout=this.layout)}handleDefaultSlotChange(){this.updateGroups(),this.queryAndStoreActions(),this.updateActions()}handleTooltipSlotChange(e){let t=b(e).filter(E);this.expandTooltip=t[0]}handleKeyDown(e){this.queryAndStoreActions();let t=this.actions.filter(n=>!n.disabled),a=document.activeElement;if(!(!v(a)||!t.includes(a)))switch(e.key){case"ArrowRight":case"ArrowDown":i(t,a,"next",!0),e.preventDefault();break;case"ArrowLeft":case"ArrowUp":i(t,a,"previous",!0),e.preventDefault();break;case"Home":i(t,a,"first",!0),e.preventDefault();break;case"End":i(t,a,"last",!0),e.preventDefault();break;case"Tab":this.updateTabIndexOfItems(a);break}}updateActions(){this.actions.forEach(e=>{e.selectionAppearance=this.selectionAppearance})}updateTabIndexOfItems(e){this.actions.forEach(t=>{let a=!t.disabled&&t===e?0:-1;a===0?t.removeAttribute("tabindex"):t.tabIndex=a})}queryAndStoreActions(){this.actions=Array.from(this.el.querySelectorAll("calcite-action"))}mutationObserverHandler(){this.updateGroups(),this.queryAndStoreActions(),this.updateActions()}renderBottomActionGroup(){let{expanded:e,expandDisabled:t,messages:a,el:n,position:w,toggleExpand:S,scale:r,layout:G,actionsEndGroupLabel:O,overlayPositioning:C}=this,d=t?null:k({collapseLabel:a.collapseLabel,collapseText:a.collapse,direction:this.direction,el:n,expanded:e,expandLabel:a.expandLabel,expandText:a.expand,position:w,scale:r,toggle:S,tooltip:this.expandTooltip});return d?s`<calcite-action-group class=${c(T.actionGroupEnd)} .label=${O} .layout=${G} .overlayPositioning=${C} .scale=${r}><slot name=${D.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>${d}</calcite-action-group>`:null}render(){return s`<div class=${c(T.container)}><slot @slotchange=${this.handleDefaultSlotChange}></slot>${this.renderBottomActionGroup()}</div>`}};m("calcite-action-pad",l);export{l as ActionPad};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as B,b as F}from"./7TR4VZRI.js";import{a as P}from"./735UOYTJ.js";import{b as L}from"./B26JHK23.js";import{a as S}from"./DHBPDNMK.js";import{a as u,c as v,d as k,e as O,f as T,g as a,h as H}from"./NO2V47RO.js";import{a as C}from"./KWXXGQXB.js";import{a as A}from"./NXBIICWN.js";import"./VXDPJESZ.js";import{a as m}from"./YP3AYJH3.js";import"./7VTO7SRW.js";import{a as d,b as p}from"./VI7SBYXT.js";import"./VUYX7MNO.js";import{a as x}from"./GBM4SNW6.js";import"./ZWPNZ5XW.js";import{e as D}from"./37IBLWMI.js";import{G as f}from"./3OUBYTMI.js";import{C as b,D as l,E as I,F as c,R as y,g as E,h,p as n}from"./XXSF7VUB.js";var M={trigger:"trigger"},w={content:"content",wrapper:"wrapper",triggerContainer:"trigger-container"},R=E`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}.wrapper{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.wrapper{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .wrapper{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.wrapper[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.wrapper:popover-open{display:block}.wrapper .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.wrapper[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.wrapper[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.wrapper[data-placement^=left] .calcite-floating-ui-anim{left:5px}.wrapper[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.wrapper .calcite-floating-ui-anim{box-shadow:var(--calcite-shadow-md)}.content{width:auto;overflow-y:auto;overflow-x:hidden;inline-size:var(--calcite-dropdown-width, var(--calcite-internal-dropdown-width));background-color:var(--calcite-dropdown-background-color, var(--calcite-color-foreground-1));max-block-size:var(--calcite-dropdown-max-height, 45vh)}.trigger-container{position:relative;display:flex;height:100%;flex:1 1 auto;overflow-wrap:break-word;word-break:break-word}.width-s{--calcite-internal-dropdown-width: 12rem}.width-m{--calcite-internal-dropdown-width: 14rem}.width-l{--calcite-internal-dropdown-width: 16rem}@media(forced-colors:active){:host([open]) .wrapper{border:var(--calcite-border-width-sm) solid canvasText}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,U=F({click:!0,hover:!0}),g=class extends I{constructor(){super(),this.referenceElementController=B({manager:U})(this),this.direction=D(),this.focusLastDropdownItem=!1,this.activeItemIndex=-1,this.groups=[],this.items=[],this.mutationObserver=d("mutation",()=>this.updateItems()),this.transitionProp="opacity",this.resizeObserver=d("resize",e=>this.resizeObserverCallback(e)),this.triggerSlotRef=b(),this.onReferenceElementKeyDown=e=>this.keyDownHandler(e),this.focusSetter=x()(this),this.interactiveContainer=A(this),this.topLayer=S({target:()=>this.floatingEl})(this),this.closeOnSelectDisabled=!1,this.disabled=!1,this.maxItems=0,this.offsetDistance=0,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement=u,this.scale="m",this.selectedItems=[],this.topLayerDisabled=!1,this.type="click",this.calciteDropdownBeforeClose=n({cancelable:!1}),this.calciteDropdownBeforeOpen=n({cancelable:!1}),this.calciteDropdownClose=n({cancelable:!1}),this.calciteDropdownOpen=n({cancelable:!1}),this.calciteDropdownSelect=n({cancelable:!1}),this.listenOn(window,"click",this.closeCalciteDropdownOnClick),this.listenOn(window,"calciteDropdownOpen",this.closeCalciteDropdownOnOpenEvent),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("calciteInternalDropdownItemSelect",this.handleItemSelect)}static{this.properties={activeDescendantElement:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnSelectDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],maxItems:[11,{},{reflect:!0,type:Number}],offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],referenceElement:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=R}get referenceElementType(){return this.referenceElement?this.type:void 0}get autoClose(){return!0}async reposition(e=!1){let{filteredFlipPlacements:t,floatingEl:i,offsetDistance:s,offsetSkidding:r,overlayPositioning:o,placement:$,referenceEl:z}=this;return O(this,{direction:this.direction,floatingEl:i,referenceEl:z,offsetDistance:s,offsetSkidding:r,overlayPositioning:o,placement:$,flipPlacements:t,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>this.referenceEl instanceof HTMLElement?this.referenceEl:this.floatingEl,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),this.updateItems(),a(this)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("maxItems")&&this.hasUpdated&&this.setMaxScrollerHeight(),this.hasUpdated&&(e.has("offsetDistance")&&this.offsetDistance!==0||e.has("offsetSkidding")&&this.offsetSkidding!==0||e.has("overlayPositioning")&&this.overlayPositioning!=="absolute"||e.has("placement")&&this.placement!==u)&&this.reposition(!0),e.has("scale")&&(this.hasUpdated||this.scale!=="m")&&this.handlePropsChange(),e.has("referenceElement")&&!this.referenceElement&&this.open&&this.topLayer.hide()}updated(e){if(e.has("referenceEl")&&this.referenceElementType){let t=e.get("referenceEl");t instanceof HTMLElement&&(t.ariaActiveDescendantElement=null),this.syncActiveDescendantOwnerElement(),a(this)}}loaded(){this.updateSelectedItems(),a(this)}disconnectedCallback(){super.disconnectedCallback();let e=this.triggerSlotRef.value;e&&(e.ariaActiveDescendantElement=null),this.referenceEl instanceof HTMLElement&&(this.referenceEl.ariaActiveDescendantElement=null),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),H(this)}openHandler(){this.disabled||(C(this),this.reposition(!0))}handleDisabledChange(e){e||(this.open=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}handlePropsChange(){this.updateItems(),this.updateGroupProps()}closeCalciteDropdownOnClick(e){this.referenceElementType||this.disabled||!this.open||e.composedPath().includes(this.el)||this.closeCalciteDropdown()}closeCalciteDropdownOnOpenEvent(e){this.referenceElementType||e.composedPath().includes(this.el)||this.closeCalciteDropdown()}pointerEnterHandler(){this.referenceElementType||this.disabled||this.type!=="hover"||(this.open=!0)}pointerLeaveHandler(){this.referenceElementType||this.disabled||this.type!=="hover"||this.closeCalciteDropdown()}getTraversableItems(){return this.items.filter(e=>!e.disabled&&!e.hidden)}async handleItemSelect(e){this.updateSelectedItems(),this.syncActiveItemFromTraversableItems(),e.stopPropagation(),this.calciteDropdownSelect.emit(),await this.setFocus(),this.closeOnSelectDisabled||this.closeCalciteDropdown()}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?k(t,e):void 0}updateItems(){this.items=this.groups.map(e=>Array.from(e?.querySelectorAll("calcite-dropdown-item"))).reduce((e,t)=>[...e,...t],[]),this.updateSelectedItems(),this.syncActiveItemFromTraversableItems(),this.reposition(!0),this.items.forEach(e=>e.scale=this.scale)}updateGroups(e){let t=e.target.assignedElements({flatten:!0}).filter(L);this.groups=t,this.updateItems(),this.updateGroupProps()}updateGroupProps(){this.groups.forEach((e,t)=>{e.scale=this.scale,e.position=t})}resizeObserverCallback(e){e.forEach(({target:t})=>{t===this.referenceEl?this.setDropdownWidth():t===this.scrollerEl&&this.setMaxScrollerHeight()})}setDropdownWidth(){let{referenceEl:e,scrollerEl:t}=this;!t||!(e instanceof HTMLElement)||(t.style.minWidth=`${e.clientWidth}px`)}setMaxScrollerHeight(){let{maxItems:e,items:t,scrollerEl:i}=this;if(!i)return;let s=t.length>=e&&e>0?this.getYDistanceFromScroller(t.at(e-1)):0;i.style.maxBlockSize=s>0?`${s}px`:"",this.reposition(!0)}setScrollerAndTransitionEl(e){p(this.resizeObserver,this.scrollerEl,e),this.scrollerEl=e,this.transitionEl=e}onBeforeOpen(){this.setInitialActiveItem(),this.calciteDropdownBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteDropdownOpen.emit()}onBeforeClose(){this.calciteDropdownBeforeClose.emit()}onClose(){this.calciteDropdownClose.emit(),this.syncActiveDescendantOwnerElement(),T(this),this.topLayer.hide()}setReferenceEl(e){let t=this.referenceEl instanceof HTMLElement?this.referenceEl:void 0,i=e instanceof HTMLElement?e:void 0;p(this.resizeObserver,t,i),!(this.referenceElementType||!i)&&(this.referenceEl=e,this.syncActiveDescendantOwnerElement(),a(this))}setFloatingEl(e){this.floatingEl=e,a(this)}handleTriggerSlotChange(){this.syncActiveDescendantOwnerElement()}keyDownHandler(e){if(!(this.referenceEl instanceof HTMLElement)||!e.composedPath().includes(this.referenceEl))return;let{defaultPrevented:t,key:i}=e;if(!t){if(this.open&&i==="Escape"){this.closeCalciteDropdown(),e.preventDefault();return}if(!this.open&&m(i)){this.open=!0,e.preventDefault();return}if(!this.open&&(i==="ArrowDown"||i==="ArrowUp")){e.preventDefault(),this.focusLastDropdownItem=i==="ArrowUp",this.open=!0;return}if(this.open){if(i==="Tab"){this.closeCalciteDropdown();return}if(i==="ArrowDown"){e.preventDefault(),this.navigateActiveItem("next");return}if(i==="ArrowUp"){e.preventDefault(),this.navigateActiveItem("previous");return}if(i==="Home"){e.preventDefault(),this.navigateActiveItem("first");return}if(i==="End"){e.preventDefault(),this.navigateActiveItem("last");return}m(i)&&(e.preventDefault(),this.activateActiveItem())}}}updateSelectedItems(){this.selectedItems=this.items.filter(e=>e.selected)}getYDistanceFromScroller(e){let{scrollerEl:t}=this;return!e||!t?NaN:e.getBoundingClientRect().bottom-t.getBoundingClientRect().top+t.scrollTop}closeCalciteDropdown(){this.open=!1,this.setActiveItemByIndex(-1)}async setInitialActiveItem(){let e=this.getTraversableItems(),t=this.focusLastDropdownItem?e.at(-1):e[0];if(this.focusLastDropdownItem=!1,!t){this.setActiveItemByIndex(-1);return}let i=e.findIndex(s=>s===t);this.setActiveItemByIndex(i),await this.scrollActiveItemIntoView(t)}syncActiveItemFromTraversableItems(){let e=this.getTraversableItems();if(!e.length){this.setActiveItemByIndex(-1);return}if(this.activeItemIndex<0||this.activeItemIndex>=e.length){this.setActiveItemByIndex(0);return}this.updateActiveDescendantElement(e[this.activeItemIndex])}setActiveItemByIndex(e){this.activeItemIndex=e;let t=this.getTraversableItems(),i=e>=0?t[e]:null;this.updateActiveDescendantElement(i)}updateActiveDescendantElement(e){this.items.forEach(t=>{t.activeDescendant=t===e}),this.activeDescendantElement=e??void 0,this.syncActiveDescendantOwnerElement()}syncActiveDescendantOwnerElement(){let{referenceEl:e,referenceElementType:t}=this,i=this.triggerSlotRef.value,s=this.open?this.activeDescendantElement??null:null,r=e instanceof HTMLElement?e:null,o=!!t;i&&(i.ariaActiveDescendantElement=o?null:s),r&&(r.ariaActiveDescendantElement=o?s:null)}navigateActiveItem(e){let t=this.getTraversableItems();if(!t.length)return;let i=t.length,s=this.activeItemIndex;s<0||s>=i?s=e==="previous"||e==="last"?i-1:0:e==="next"?s=(s+1)%i:e==="previous"?s=(s-1+i)%i:e==="first"?s=0:e==="last"&&(s=i-1);let r=t[s];this.setActiveItemByIndex(s),this.scrollActiveItemIntoView(r)}async scrollActiveItemIntoView(e){e&&(await this.updateComplete,await f(),await f(),e.scrollIntoView({block:"nearest"}))}activateActiveItem(){let e=this.getTraversableItems(),t=e[this.activeItemIndex]||e[0];t&&(this.setActiveItemByIndex(e.findIndex(i=>i===t)),t.activateItem())}openHoverDropdown(){this.open||this.disabled||this.type!=="hover"||(this.open=!0)}closeHoverDropdown(e){if(!this.open||this.disabled||this.type!=="hover")return;let t=e.relatedTarget;t&&(this.el.contains(t)||this.referenceEl!=null&&this.referenceEl instanceof HTMLElement&&this.referenceEl.contains(t))||this.closeCalciteDropdown()}toggleClickDropdown(){this.disabled||this.type!=="click"||(this.open=!this.open)}render(){let{open:e}=this;return this.interactiveContainer({disabled:this.disabled,children:h`${this.referenceElementType?null:h`<div class=${c(w.triggerContainer)} @click=${this.toggleClickDropdown} @focusin=${this.openHoverDropdown} @focusout=${this.closeHoverDropdown} @keydown=${this.keyDownHandler} ${l(this.setReferenceEl)}><slot .ariaControlsElements=${this.scrollerEl?[this.scrollerEl]:void 0} .ariaExpanded=${e} aria-haspopup=menu name=${M.trigger} @slotchange=${this.handleTriggerSlotChange} ${l(this.triggerSlotRef)}></slot></div>`}<div class=${c({[w.wrapper]:!0,[P("width",this.width,this.widthScale)]:!!(this.width||this.widthScale)})} .inert=${!e} popover=manual ${l(this.setFloatingEl)}><div .ariaLabelledByElements=${this.referenceEl instanceof HTMLElement?[this.referenceEl]:void 0} class=${c({[w.content]:!0,[v.animation]:!0,[v.animationActive]:e})} role=menu ${l(this.setScrollerAndTransitionEl)}><slot @slotchange=${this.updateGroups}></slot></div></div>`})}};y("calcite-dropdown",g);export{g as Dropdown};
2
+ import{a as B,b as F}from"./AZ5ZWXXK.js";import{a as P}from"./735UOYTJ.js";import{b as L}from"./B26JHK23.js";import{a as S}from"./IWWJYWY5.js";import{a as u,c as v,d as k,e as O,f as T,g as a,h as H}from"./GBUMWAMI.js";import{a as C}from"./QEZ3GMQZ.js";import{a as A}from"./M3CH5PK6.js";import"./VXDPJESZ.js";import{a as m}from"./YP3AYJH3.js";import"./7VTO7SRW.js";import{a as d,b as p}from"./VI7SBYXT.js";import"./VUYX7MNO.js";import{a as x}from"./PW7YMRBF.js";import"./ZWPNZ5XW.js";import{e as D}from"./I5K6EDCU.js";import{G as f}from"./3QPETC2U.js";import{C as b,D as l,E as I,F as c,R as y,g as E,h,p as n}from"./RQONITLI.js";var M={trigger:"trigger"},w={content:"content",wrapper:"wrapper",triggerContainer:"trigger-container"},R=E`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}.wrapper{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.wrapper{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .wrapper{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.wrapper[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.wrapper:popover-open{display:block}.wrapper .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.wrapper[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.wrapper[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.wrapper[data-placement^=left] .calcite-floating-ui-anim{left:5px}.wrapper[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.wrapper .calcite-floating-ui-anim{box-shadow:var(--calcite-shadow-md)}.content{width:auto;overflow-y:auto;overflow-x:hidden;inline-size:var(--calcite-dropdown-width, var(--calcite-internal-dropdown-width));background-color:var(--calcite-dropdown-background-color, var(--calcite-color-foreground-1));max-block-size:var(--calcite-dropdown-max-height, 45vh)}.trigger-container{position:relative;display:flex;height:100%;flex:1 1 auto;overflow-wrap:break-word;word-break:break-word}.width-s{--calcite-internal-dropdown-width: 12rem}.width-m{--calcite-internal-dropdown-width: 14rem}.width-l{--calcite-internal-dropdown-width: 16rem}@media(forced-colors:active){:host([open]) .wrapper{border:var(--calcite-border-width-sm) solid canvasText}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,U=F({click:!0,hover:!0}),g=class extends I{constructor(){super(),this.referenceElementController=B({manager:U})(this),this.direction=D(),this.focusLastDropdownItem=!1,this.activeItemIndex=-1,this.groups=[],this.items=[],this.mutationObserver=d("mutation",()=>this.updateItems()),this.transitionProp="opacity",this.resizeObserver=d("resize",e=>this.resizeObserverCallback(e)),this.triggerSlotRef=b(),this.onReferenceElementKeyDown=e=>this.keyDownHandler(e),this.focusSetter=x()(this),this.interactiveContainer=A(this),this.topLayer=S({target:()=>this.floatingEl})(this),this.closeOnSelectDisabled=!1,this.disabled=!1,this.maxItems=0,this.offsetDistance=0,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement=u,this.scale="m",this.selectedItems=[],this.topLayerDisabled=!1,this.type="click",this.calciteDropdownBeforeClose=n({cancelable:!1}),this.calciteDropdownBeforeOpen=n({cancelable:!1}),this.calciteDropdownClose=n({cancelable:!1}),this.calciteDropdownOpen=n({cancelable:!1}),this.calciteDropdownSelect=n({cancelable:!1}),this.listenOn(window,"click",this.closeCalciteDropdownOnClick),this.listenOn(window,"calciteDropdownOpen",this.closeCalciteDropdownOnOpenEvent),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("calciteInternalDropdownItemSelect",this.handleItemSelect)}static{this.properties={activeDescendantElement:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnSelectDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],maxItems:[11,{},{reflect:!0,type:Number}],offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],referenceElement:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=R}get referenceElementType(){return this.referenceElement?this.type:void 0}get autoClose(){return!0}async reposition(e=!1){let{filteredFlipPlacements:t,floatingEl:i,offsetDistance:s,offsetSkidding:r,overlayPositioning:o,placement:$,referenceEl:z}=this;return O(this,{direction:this.direction,floatingEl:i,referenceEl:z,offsetDistance:s,offsetSkidding:r,overlayPositioning:o,placement:$,flipPlacements:t,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>this.referenceEl instanceof HTMLElement?this.referenceEl:this.floatingEl,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),this.updateItems(),a(this)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("maxItems")&&this.hasUpdated&&this.setMaxScrollerHeight(),this.hasUpdated&&(e.has("offsetDistance")&&this.offsetDistance!==0||e.has("offsetSkidding")&&this.offsetSkidding!==0||e.has("overlayPositioning")&&this.overlayPositioning!=="absolute"||e.has("placement")&&this.placement!==u)&&this.reposition(!0),e.has("scale")&&(this.hasUpdated||this.scale!=="m")&&this.handlePropsChange(),e.has("referenceElement")&&!this.referenceElement&&this.open&&this.topLayer.hide()}updated(e){if(e.has("referenceEl")&&this.referenceElementType){let t=e.get("referenceEl");t instanceof HTMLElement&&(t.ariaActiveDescendantElement=null),this.syncActiveDescendantOwnerElement(),a(this)}}loaded(){this.updateSelectedItems(),a(this)}disconnectedCallback(){super.disconnectedCallback();let e=this.triggerSlotRef.value;e&&(e.ariaActiveDescendantElement=null),this.referenceEl instanceof HTMLElement&&(this.referenceEl.ariaActiveDescendantElement=null),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),H(this)}openHandler(){this.disabled||(C(this),this.reposition(!0))}handleDisabledChange(e){e||(this.open=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}handlePropsChange(){this.updateItems(),this.updateGroupProps()}closeCalciteDropdownOnClick(e){this.referenceElementType||this.disabled||!this.open||e.composedPath().includes(this.el)||this.closeCalciteDropdown()}closeCalciteDropdownOnOpenEvent(e){this.referenceElementType||e.composedPath().includes(this.el)||this.closeCalciteDropdown()}pointerEnterHandler(){this.referenceElementType||this.disabled||this.type!=="hover"||(this.open=!0)}pointerLeaveHandler(){this.referenceElementType||this.disabled||this.type!=="hover"||this.closeCalciteDropdown()}getTraversableItems(){return this.items.filter(e=>!e.disabled&&!e.hidden)}async handleItemSelect(e){this.updateSelectedItems(),this.syncActiveItemFromTraversableItems(),e.stopPropagation(),this.calciteDropdownSelect.emit(),await this.setFocus(),this.closeOnSelectDisabled||this.closeCalciteDropdown()}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?k(t,e):void 0}updateItems(){this.items=this.groups.map(e=>Array.from(e?.querySelectorAll("calcite-dropdown-item"))).reduce((e,t)=>[...e,...t],[]),this.updateSelectedItems(),this.syncActiveItemFromTraversableItems(),this.reposition(!0),this.items.forEach(e=>e.scale=this.scale)}updateGroups(e){let t=e.target.assignedElements({flatten:!0}).filter(L);this.groups=t,this.updateItems(),this.updateGroupProps()}updateGroupProps(){this.groups.forEach((e,t)=>{e.scale=this.scale,e.position=t})}resizeObserverCallback(e){e.forEach(({target:t})=>{t===this.referenceEl?this.setDropdownWidth():t===this.scrollerEl&&this.setMaxScrollerHeight()})}setDropdownWidth(){let{referenceEl:e,scrollerEl:t}=this;!t||!(e instanceof HTMLElement)||(t.style.minWidth=`${e.clientWidth}px`)}setMaxScrollerHeight(){let{maxItems:e,items:t,scrollerEl:i}=this;if(!i)return;let s=t.length>=e&&e>0?this.getYDistanceFromScroller(t.at(e-1)):0;i.style.maxBlockSize=s>0?`${s}px`:"",this.reposition(!0)}setScrollerAndTransitionEl(e){p(this.resizeObserver,this.scrollerEl,e),this.scrollerEl=e,this.transitionEl=e}onBeforeOpen(){this.setInitialActiveItem(),this.calciteDropdownBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteDropdownOpen.emit()}onBeforeClose(){this.calciteDropdownBeforeClose.emit()}onClose(){this.calciteDropdownClose.emit(),this.syncActiveDescendantOwnerElement(),T(this),this.topLayer.hide()}setReferenceEl(e){let t=this.referenceEl instanceof HTMLElement?this.referenceEl:void 0,i=e instanceof HTMLElement?e:void 0;p(this.resizeObserver,t,i),!(this.referenceElementType||!i)&&(this.referenceEl=e,this.syncActiveDescendantOwnerElement(),a(this))}setFloatingEl(e){this.floatingEl=e,a(this)}handleTriggerSlotChange(){this.syncActiveDescendantOwnerElement()}keyDownHandler(e){if(!(this.referenceEl instanceof HTMLElement)||!e.composedPath().includes(this.referenceEl))return;let{defaultPrevented:t,key:i}=e;if(!t){if(this.open&&i==="Escape"){this.closeCalciteDropdown(),e.preventDefault();return}if(!this.open&&m(i)){this.open=!0,e.preventDefault();return}if(!this.open&&(i==="ArrowDown"||i==="ArrowUp")){e.preventDefault(),this.focusLastDropdownItem=i==="ArrowUp",this.open=!0;return}if(this.open){if(i==="Tab"){this.closeCalciteDropdown();return}if(i==="ArrowDown"){e.preventDefault(),this.navigateActiveItem("next");return}if(i==="ArrowUp"){e.preventDefault(),this.navigateActiveItem("previous");return}if(i==="Home"){e.preventDefault(),this.navigateActiveItem("first");return}if(i==="End"){e.preventDefault(),this.navigateActiveItem("last");return}m(i)&&(e.preventDefault(),this.activateActiveItem())}}}updateSelectedItems(){this.selectedItems=this.items.filter(e=>e.selected)}getYDistanceFromScroller(e){let{scrollerEl:t}=this;return!e||!t?NaN:e.getBoundingClientRect().bottom-t.getBoundingClientRect().top+t.scrollTop}closeCalciteDropdown(){this.open=!1,this.setActiveItemByIndex(-1)}async setInitialActiveItem(){let e=this.getTraversableItems(),t=this.focusLastDropdownItem?e.at(-1):e[0];if(this.focusLastDropdownItem=!1,!t){this.setActiveItemByIndex(-1);return}let i=e.findIndex(s=>s===t);this.setActiveItemByIndex(i),await this.scrollActiveItemIntoView(t)}syncActiveItemFromTraversableItems(){let e=this.getTraversableItems();if(!e.length){this.setActiveItemByIndex(-1);return}if(this.activeItemIndex<0||this.activeItemIndex>=e.length){this.setActiveItemByIndex(0);return}this.updateActiveDescendantElement(e[this.activeItemIndex])}setActiveItemByIndex(e){this.activeItemIndex=e;let t=this.getTraversableItems(),i=e>=0?t[e]:null;this.updateActiveDescendantElement(i)}updateActiveDescendantElement(e){this.items.forEach(t=>{t.activeDescendant=t===e}),this.activeDescendantElement=e??void 0,this.syncActiveDescendantOwnerElement()}syncActiveDescendantOwnerElement(){let{referenceEl:e,referenceElementType:t}=this,i=this.triggerSlotRef.value,s=this.open?this.activeDescendantElement??null:null,r=e instanceof HTMLElement?e:null,o=!!t;i&&(i.ariaActiveDescendantElement=o?null:s),r&&(r.ariaActiveDescendantElement=o?s:null)}navigateActiveItem(e){let t=this.getTraversableItems();if(!t.length)return;let i=t.length,s=this.activeItemIndex;s<0||s>=i?s=e==="previous"||e==="last"?i-1:0:e==="next"?s=(s+1)%i:e==="previous"?s=(s-1+i)%i:e==="first"?s=0:e==="last"&&(s=i-1);let r=t[s];this.setActiveItemByIndex(s),this.scrollActiveItemIntoView(r)}async scrollActiveItemIntoView(e){e&&(await this.updateComplete,await f(),await f(),e.scrollIntoView({block:"nearest"}))}activateActiveItem(){let e=this.getTraversableItems(),t=e[this.activeItemIndex]||e[0];t&&(this.setActiveItemByIndex(e.findIndex(i=>i===t)),t.activateItem())}openHoverDropdown(){this.open||this.disabled||this.type!=="hover"||(this.open=!0)}closeHoverDropdown(e){if(!this.open||this.disabled||this.type!=="hover")return;let t=e.relatedTarget;t&&(this.el.contains(t)||this.referenceEl!=null&&this.referenceEl instanceof HTMLElement&&this.referenceEl.contains(t))||this.closeCalciteDropdown()}toggleClickDropdown(){this.disabled||this.type!=="click"||(this.open=!this.open)}render(){let{open:e}=this;return this.interactiveContainer({disabled:this.disabled,children:h`${this.referenceElementType?null:h`<div class=${c(w.triggerContainer)} @click=${this.toggleClickDropdown} @focusin=${this.openHoverDropdown} @focusout=${this.closeHoverDropdown} @keydown=${this.keyDownHandler} ${l(this.setReferenceEl)}><slot .ariaControlsElements=${this.scrollerEl?[this.scrollerEl]:void 0} .ariaExpanded=${e} aria-haspopup=menu name=${M.trigger} @slotchange=${this.handleTriggerSlotChange} ${l(this.triggerSlotRef)}></slot></div>`}<div class=${c({[w.wrapper]:!0,[P("width",this.width,this.widthScale)]:!!(this.width||this.widthScale)})} .inert=${!e} popover=manual ${l(this.setFloatingEl)}><div .ariaLabelledByElements=${this.referenceEl instanceof HTMLElement?[this.referenceEl]:void 0} class=${c({[w.content]:!0,[v.animation]:!0,[v.animationActive]:e})} role=menu ${l(this.setScrollerAndTransitionEl)}><slot @slotchange=${this.updateGroups}></slot></div></div>`})}};y("calcite-dropdown",g);export{g as Dropdown};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as Q}from"./YP3AYJH3.js";import{b as G}from"./7VTO7SRW.js";import{b as W}from"./37IBLWMI.js";import{A as z,B as $,k as X,m as V}from"./3OUBYTMI.js";import{O as U}from"./XXSF7VUB.js";var Le=i=>{let{manager:a}=i;return W((o,c)=>{let u,f,g=l=>!!(l&&o.referenceElementType),E=l=>{g(l)&&(a.registerElement(o,l),f=l)},h=l=>{g(l)&&(a.unregisterElement(o,l),f===l&&(f=void 0))},k=l=>{let{referenceElement:m,el:C}=l;return(typeof m=="string"?V(C,{id:m}):m)||void 0},v=(l=!0)=>{if(!o.referenceElementType)return;o.referenceEl=k(o);let{el:m,referenceElement:C,referenceEl:D}=o;l&&C&&!D&&U.warn(`${m.tagName}: reference-element id "${C}" was not found.`,{el:m})};c.onConnected(()=>{u=requestAnimationFrame(()=>{o.el.isConnected&&(v(o.manager.loadedCalled),E(o.referenceEl))})}),c.onLoaded(()=>{o.referenceElement&&!o.referenceEl&&v()}),c.onUpdate(l=>{o.hasUpdated&&(l.has("referenceElement")&&v(),l.has("referenceEl")?(h(l.get("referenceEl")),E(o.referenceEl)):(l.has("open")||l.has("triggerDisabled"))&&a.updateElement(o,o.referenceEl))}),c.onDisconnected(()=>{u!=null&&(cancelAnimationFrame(u),u=void 0),h(f)})})};function j(i,a){if(i===a)return!0;if(i.length!==a.length)return!1;let o=new Set(i),c=new Set(a);if(o.size!==c.size)return!1;for(let u of o)if(!c.has(u))return!1;return!0}var me=5,R=300,ge=R/3,ve=R*1.5;function Ee({startX:i,startY:a,endX:o,endY:c}){return Math.hypot(o-i,c-a)>me}var He=i=>{let a=new Map,o=new WeakMap,c=new WeakSet,u=new WeakMap,f=null,g=null,E=null,h=null,k=null,v=null,l=0,m=(e,t)=>{let n=e.find(s=>a.has(s));if(!n)return;let r=a.get(n);return t?r?.filter(s=>s.referenceElementType===t):r},C=(e,t)=>{let n=e.composedPath(),r=m(n,t);r?.forEach(s=>{s&&!s.triggerDisabled&&(s.open=!s.open)}),Array.from(a.values()).flat().filter(s=>!r?.includes(s)&&s.autoClose&&s.open&&!n.includes(s.el)).forEach(s=>s.open=!1)},D=e=>{$(e)||e.defaultPrevented||v&&Ee({endY:e.clientY,endX:e.clientX,startY:v.y,startX:v.x})||(v=null,C(e,"click"))},b=()=>{h!=null&&window.clearTimeout(h),h=null},A=()=>{E!=null&&window.clearTimeout(E),E=null},w=()=>{b(),A()},P=(e,t)=>!!(f?.some(n=>n?.open&&t.includes(n.el))||e?.some(n=>n?.open&&t.includes(n.el))),y=(e,t)=>{e?.forEach(n=>n.open=t),f=t?e:null},p=()=>{y(f,!1)},J=e=>{if(e.key==="Escape"&&!e.defaultPrevented){let t=f?.filter(n=>n?.open);if(t?.length){w(),p();let n=e.composedPath();t.some(r=>r.referenceEl instanceof Element&&n.includes(r.referenceEl)||n.includes(r.el))&&e.preventDefault()}}},Z=e=>{if(e.defaultPrevented)return;g=null;let t=e.composedPath(),n=m(t,"hover");if(P(n,t)){w();return}if(p(),!n?.length)return;w();let r=n.filter(d=>d.closeOnClick),s=n.filter(d=>!d.closeOnClick);r?.length&&(g=r,y(r,!1)),y(s,!0)},T=e=>{if(e.defaultPrevented||!z(e))return;let{clientX:t,clientY:n}=e;v={x:t,y:n}},ee=e=>{e.defaultPrevented||(e.key==="Escape"?ne():Q(e.key)&&C(e,"click"))},te=e=>{m(e.composedPath())?.forEach(n=>n.onReferenceElementKeyDown?.(e))},ne=()=>{Array.from(a.values()).flat().forEach(e=>e.open=!1)},S=e=>{j(e??[],f??[])||p()},re=e=>{h=window.setTimeout(()=>{h===null||!j(e??[],k??[])||(A(),S(e),y(e,!0))},f?.some(t=>t.open)?ge:R)},O=()=>{E=window.setTimeout(()=>{E!==null&&p()},ve)},x=e=>{if(e.defaultPrevented){p();return}let t=e.composedPath(),n=m(t,"hover");if(P(n,t)){w();return}n?.some(r=>g?.includes(r))||(n?.some(r=>k?.includes(r))||b(),k=n,n?.length?re(n):f?.some(r=>r?.open)&&O(),g=null)},M=()=>{p()},_=e=>{e.defaultPrevented||(w(),O())},B=e=>{i.click&&D(e),i.hover&&Z(e)},Y=e=>{te(e),i.click&&ee(e),i.hover&&J(e)},se=()=>{(i.click||i.hover)&&(window.addEventListener("click",B),window.addEventListener("keydown",Y)),i.click&&window.addEventListener("pointerdown",T),i.hover&&(window.addEventListener("pointermove",x),window.addEventListener("focusin",L),window.addEventListener("blur",M),document.addEventListener("pointerleave",_))},ie=()=>{(i.click||i.hover)&&(window.removeEventListener("click",B),window.removeEventListener("keydown",Y)),i.click&&window.removeEventListener("pointerdown",T),i.hover&&(window.removeEventListener("pointermove",x),window.removeEventListener("focusin",L),window.removeEventListener("blur",M),document.removeEventListener("pointerleave",_))},oe=(e,t)=>{w(),y(e,t)},K=e=>e instanceof Element?X(e):null,L=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),n=m(t,"hover");if(P(n,t)){w();return}n?.some(r=>g?.includes(r))||(g=null,S(n),n?.length&&oe(n,!0))},N=(e,t)=>{if(!("ariaExpanded"in e))return;let n=t.filter(r=>!r.triggerDisabled);if(n.length){e.ariaExpanded=G(n.some(r=>r.open)),c.add(e);return}c.has(e)&&(e.ariaExpanded=null,c.delete(e))},I=(e,t,n=!t.triggerDisabled)=>{if(!("ariaControlsElements"in e))return;let r=e.ariaControlsElements??[],s=r.includes(t.el),d=o.get(e);if(!n){if(!d?.has(t))return;let H=r.filter(fe=>fe!==t.el);e.ariaControlsElements=H.length>0?H:null,d?.delete(t);return}s||(e.ariaControlsElements=[...r,t.el],d?d.add(t):o.set(e,new WeakSet([t])))},q=(e,t)=>{!t||!e.referenceElementType||i.click&&(I(t,e),N(t,a.get(t)??[]))},le=e=>{e.addEventListener("focusin",L)},ae=e=>{e.removeEventListener("focusin",L)},de=e=>{let t=u.get(e),n=(typeof t=="number"?t:0)+1;n===1&&le(e),u.set(e,n)},ce=e=>{let t=u.get(e),n=typeof t=="number"?t:0,r=Math.max(0,n-1);if(n>0&&r===0){ae(e),u.delete(e);return}r>0&&u.set(e,r)},ue=(e,t)=>{if(!t||!e.referenceElementType)return;let n=a.get(t)??[];if(n.includes(e))return;if(i.hover&&"ariaDescribedByElements"in t){let s=t.ariaDescribedByElements??[];if(!s.includes(e.el)){let d=[...s,e.el];t.ariaDescribedByElements=d}}l++,a.set(t,[...n,e]);let r=i.hover?K(t):null;r&&de(r),l===1&&se(),q(e,t)},F=e=>{l--,e&&ce(e)};return{registerElement:ue,unregisterElement:(e,t)=>{if(!t||!e.referenceElementType)return;let n=i.hover?K(t):null,r=a.get(t)??[],s=r.filter(d=>d!==e);if(s.length>0?(a.set(t,s),s.length!==r.length&&F(n)):a.delete(t)&&F(n),l===0&&(ie(),w()),i.click&&(I(t,e,!1),N(t,s)),i.hover&&"ariaDescribedByElements"in t){let d=(t.ariaDescribedByElements??[]).filter(H=>H!==e.el);t.ariaDescribedByElements=d.length>0?d:null}},updateElement:q}};export{Le as a,He as b};
2
+ import{a as Q}from"./YP3AYJH3.js";import{b as G}from"./7VTO7SRW.js";import{b as W}from"./I5K6EDCU.js";import{A as z,B as $,k as X,m as V}from"./3QPETC2U.js";import{O as U}from"./RQONITLI.js";var Le=i=>{let{manager:a}=i;return W((o,c)=>{let u,f,g=l=>!!(l&&o.referenceElementType),E=l=>{g(l)&&(a.registerElement(o,l),f=l)},h=l=>{g(l)&&(a.unregisterElement(o,l),f===l&&(f=void 0))},k=l=>{let{referenceElement:m,el:C}=l;return(typeof m=="string"?V(C,{id:m}):m)||void 0},v=(l=!0)=>{if(!o.referenceElementType)return;o.referenceEl=k(o);let{el:m,referenceElement:C,referenceEl:D}=o;l&&C&&!D&&U.warn(`${m.tagName}: reference-element id "${C}" was not found.`,{el:m})};c.onConnected(()=>{u=requestAnimationFrame(()=>{o.el.isConnected&&(v(o.manager.loadedCalled),E(o.referenceEl))})}),c.onLoaded(()=>{o.referenceElement&&!o.referenceEl&&v()}),c.onUpdate(l=>{o.hasUpdated&&(l.has("referenceElement")&&v(),l.has("referenceEl")?(h(l.get("referenceEl")),E(o.referenceEl)):(l.has("open")||l.has("triggerDisabled"))&&a.updateElement(o,o.referenceEl))}),c.onDisconnected(()=>{u!=null&&(cancelAnimationFrame(u),u=void 0),h(f)})})};function j(i,a){if(i===a)return!0;if(i.length!==a.length)return!1;let o=new Set(i),c=new Set(a);if(o.size!==c.size)return!1;for(let u of o)if(!c.has(u))return!1;return!0}var me=5,R=300,ge=R/3,ve=R*1.5;function Ee({startX:i,startY:a,endX:o,endY:c}){return Math.hypot(o-i,c-a)>me}var He=i=>{let a=new Map,o=new WeakMap,c=new WeakSet,u=new WeakMap,f=null,g=null,E=null,h=null,k=null,v=null,l=0,m=(e,t)=>{let n=e.find(s=>a.has(s));if(!n)return;let r=a.get(n);return t?r?.filter(s=>s.referenceElementType===t):r},C=(e,t)=>{let n=e.composedPath(),r=m(n,t);r?.forEach(s=>{s&&!s.triggerDisabled&&(s.open=!s.open)}),Array.from(a.values()).flat().filter(s=>!r?.includes(s)&&s.autoClose&&s.open&&!n.includes(s.el)).forEach(s=>s.open=!1)},D=e=>{$(e)||e.defaultPrevented||v&&Ee({endY:e.clientY,endX:e.clientX,startY:v.y,startX:v.x})||(v=null,C(e,"click"))},b=()=>{h!=null&&window.clearTimeout(h),h=null},A=()=>{E!=null&&window.clearTimeout(E),E=null},w=()=>{b(),A()},P=(e,t)=>!!(f?.some(n=>n?.open&&t.includes(n.el))||e?.some(n=>n?.open&&t.includes(n.el))),y=(e,t)=>{e?.forEach(n=>n.open=t),f=t?e:null},p=()=>{y(f,!1)},J=e=>{if(e.key==="Escape"&&!e.defaultPrevented){let t=f?.filter(n=>n?.open);if(t?.length){w(),p();let n=e.composedPath();t.some(r=>r.referenceEl instanceof Element&&n.includes(r.referenceEl)||n.includes(r.el))&&e.preventDefault()}}},Z=e=>{if(e.defaultPrevented)return;g=null;let t=e.composedPath(),n=m(t,"hover");if(P(n,t)){w();return}if(p(),!n?.length)return;w();let r=n.filter(d=>d.closeOnClick),s=n.filter(d=>!d.closeOnClick);r?.length&&(g=r,y(r,!1)),y(s,!0)},T=e=>{if(e.defaultPrevented||!z(e))return;let{clientX:t,clientY:n}=e;v={x:t,y:n}},ee=e=>{e.defaultPrevented||(e.key==="Escape"?ne():Q(e.key)&&C(e,"click"))},te=e=>{m(e.composedPath())?.forEach(n=>n.onReferenceElementKeyDown?.(e))},ne=()=>{Array.from(a.values()).flat().forEach(e=>e.open=!1)},S=e=>{j(e??[],f??[])||p()},re=e=>{h=window.setTimeout(()=>{h===null||!j(e??[],k??[])||(A(),S(e),y(e,!0))},f?.some(t=>t.open)?ge:R)},O=()=>{E=window.setTimeout(()=>{E!==null&&p()},ve)},x=e=>{if(e.defaultPrevented){p();return}let t=e.composedPath(),n=m(t,"hover");if(P(n,t)){w();return}n?.some(r=>g?.includes(r))||(n?.some(r=>k?.includes(r))||b(),k=n,n?.length?re(n):f?.some(r=>r?.open)&&O(),g=null)},M=()=>{p()},_=e=>{e.defaultPrevented||(w(),O())},B=e=>{i.click&&D(e),i.hover&&Z(e)},Y=e=>{te(e),i.click&&ee(e),i.hover&&J(e)},se=()=>{(i.click||i.hover)&&(window.addEventListener("click",B),window.addEventListener("keydown",Y)),i.click&&window.addEventListener("pointerdown",T),i.hover&&(window.addEventListener("pointermove",x),window.addEventListener("focusin",L),window.addEventListener("blur",M),document.addEventListener("pointerleave",_))},ie=()=>{(i.click||i.hover)&&(window.removeEventListener("click",B),window.removeEventListener("keydown",Y)),i.click&&window.removeEventListener("pointerdown",T),i.hover&&(window.removeEventListener("pointermove",x),window.removeEventListener("focusin",L),window.removeEventListener("blur",M),document.removeEventListener("pointerleave",_))},oe=(e,t)=>{w(),y(e,t)},K=e=>e instanceof Element?X(e):null,L=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),n=m(t,"hover");if(P(n,t)){w();return}n?.some(r=>g?.includes(r))||(g=null,S(n),n?.length&&oe(n,!0))},N=(e,t)=>{if(!("ariaExpanded"in e))return;let n=t.filter(r=>!r.triggerDisabled);if(n.length){e.ariaExpanded=G(n.some(r=>r.open)),c.add(e);return}c.has(e)&&(e.ariaExpanded=null,c.delete(e))},I=(e,t,n=!t.triggerDisabled)=>{if(!("ariaControlsElements"in e))return;let r=e.ariaControlsElements??[],s=r.includes(t.el),d=o.get(e);if(!n){if(!d?.has(t))return;let H=r.filter(fe=>fe!==t.el);e.ariaControlsElements=H.length>0?H:null,d?.delete(t);return}s||(e.ariaControlsElements=[...r,t.el],d?d.add(t):o.set(e,new WeakSet([t])))},q=(e,t)=>{!t||!e.referenceElementType||i.click&&(I(t,e),N(t,a.get(t)??[]))},le=e=>{e.addEventListener("focusin",L)},ae=e=>{e.removeEventListener("focusin",L)},de=e=>{let t=u.get(e),n=(typeof t=="number"?t:0)+1;n===1&&le(e),u.set(e,n)},ce=e=>{let t=u.get(e),n=typeof t=="number"?t:0,r=Math.max(0,n-1);if(n>0&&r===0){ae(e),u.delete(e);return}r>0&&u.set(e,r)},ue=(e,t)=>{if(!t||!e.referenceElementType)return;let n=a.get(t)??[];if(n.includes(e))return;if(i.hover&&"ariaDescribedByElements"in t){let s=t.ariaDescribedByElements??[];if(!s.includes(e.el)){let d=[...s,e.el];t.ariaDescribedByElements=d}}l++,a.set(t,[...n,e]);let r=i.hover?K(t):null;r&&de(r),l===1&&se(),q(e,t)},F=e=>{l--,e&&ce(e)};return{registerElement:ue,unregisterElement:(e,t)=>{if(!t||!e.referenceElementType)return;let n=i.hover?K(t):null,r=a.get(t)??[],s=r.filter(d=>d!==e);if(s.length>0?(a.set(t,s),s.length!==r.length&&F(n)):a.delete(t)&&F(n),l===0&&(ie(),w()),i.click&&(I(t,e,!1),N(t,s)),i.hover&&"ariaDescribedByElements"in t){let d=(t.ariaDescribedByElements??[]).filter(H=>H!==e.el);t.ariaDescribedByElements=d.length>0?d:null}},updateElement:q}};export{Le as a,He as b};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{m as L}from"./MBM7UIXE.js";import{a as v}from"./FPAZVBXQ.js";import"./YP3AYJH3.js";import{a as T}from"./VI7SBYXT.js";import{a as M}from"./XPKPBZJW.js";import"./37IBLWMI.js";import{t as V}from"./3OUBYTMI.js";import{C as u,D as m,E as k,F as b,G as p,R as C,g as z,h}from"./XXSF7VUB.js";var r={container:"container",fill:"fill",stepLine:"step-line",label:"label",labelHidden:"label-hidden",labelRange:"label-range",labelValue:"label-value",unitLabel:"unit-label",stepsVisible:"steps-visible",valueVisible:"value-visible",success:"fill-success",warning:"fill-warning",danger:"fill-danger"},N=z`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host{display:flex;--calcite-internal-meter-space: var(--calcite-spacing-base);--calcite-internal-meter-height: var(--calcite-spacing-lg);--calcite-internal-meter-font-size: var(--calcite-font-size--1);--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand));--calcite-internal-meter-background-color: var(--calcite-meter-background-color, var(--calcite-color-foreground-2));--calcite-internal-meter-border-color: var(--calcite-meter-border-color, var(--calcite-color-border-2));--calcite-internal-meter-shadow: var(--calcite-meter-shadow, var(--calcite-shadow-none));--calcite-internal-meter-corner-radius: var(--calcite-meter-corner-radius, 9999px);--calcite-internal-meter-value-text-color: var(--calcite-meter-value-text-color, var(--calcite-color-text-1));--calcite-internal-meter-range-text-color: var(--calcite-meter-range-text-color, var(--calcite-color-text-3));--calcite-internal-meter-label-line-height: var(--calcite-font-line-height-base)}:host([scale=s]){--calcite-internal-meter-height: var(--calcite-spacing-md);--calcite-internal-meter-font-size: var(--calcite-font-size--2)}:host([scale=l]){--calcite-internal-meter-height: var(--calcite-spacing-xxl);--calcite-internal-meter-font-size: var(--calcite-font-size-0);--calcite-internal-meter-label-line-height: var(--calcite-font-line-height-md)}:host([appearance=solid]){--calcite-internal-meter-border-color: var(--calcite-color-foreground-3);--calcite-internal-meter-background-color: var(--calcite-color-foreground-3)}:host([appearance=outline]){--calcite-internal-meter-background-color: transparent}.fill{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand))}.fill-danger{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-danger))}.fill-success{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-success))}.fill-warning{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-warning))}.container{position:relative;display:flex;align-items:center;margin:0;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-internal-meter-height);background-color:var(--calcite-internal-meter-background-color);border:var(--calcite-border-width-sm) solid var(--calcite-internal-meter-border-color);border-radius:var(--calcite-internal-meter-corner-radius);box-shadow:var(--calcite-internal-meter-shadow)}.value-visible{margin-block-start:var(--calcite-spacing-xxl)}.steps-visible{margin-block-end:var(--calcite-spacing-xxl)}.step-line{position:absolute;inset-block:0px;display:block;inline-size:var(--calcite-internal-meter-space);background-color:var(--calcite-internal-meter-border-color)}.label{position:absolute;display:flex;gap:var(--calcite-spacing-xxs);font-size:var(--calcite-internal-meter-font-size);line-height:var(--calcite-internal-meter-label-line-height)}.label-hidden{visibility:hidden;opacity:0}.label-value{inset-block-end:calc(100% + .5em);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-internal-meter-value-text-color)}.label-range{color:var(--calcite-internal-meter-range-text-color);inset-block-start:calc(100% + .5em)}.label-range .unit-label{font-weight:var(--calcite-font-weight-medium)}.fill{position:absolute;z-index:var(--calcite-z-index);display:block;transition-timing-function:cubic-bezier(.4,0,.2,1);inset-inline-start:var(--calcite-internal-meter-space);inset-block:var(--calcite-internal-meter-space);border-radius:var(--calcite-internal-meter-corner-radius);max-inline-size:calc(100% - var(--calcite-internal-meter-space) * 2);min-inline-size:calc(var(--calcite-internal-meter-height) - var(--calcite-internal-meter-space) * 2);background-color:var(--calcite-internal-meter-fill-color);transition-property:inline-size,background-color,box-shadow}.solid .fill{inset-block:0;inset-inline-start:0;max-inline-size:100%;min-inline-size:calc(var(--calcite-internal-meter-height));box-shadow:0 0 0 1px var(--calcite-internal-meter-fill-color)}`,y=class extends k{constructor(){super(...arguments),this.highLabelRef=u(),this.labelFlipMax=.8,this.labelFlipProximity=.15,this.lowLabelRef=u(),this.maxLabelRef=u(),this.maxPercent=100,this.messages=M({name:null}),this.meterContainerRef=u(),this.minLabelRef=u(),this.minPercent=0,this.resizeObserver=T("resize",()=>this.resizeHandler()),this.valueLabelRef=u(),this.currentPercent=0,this.highActive=!1,this.highPercent=100,this.lowActive=!1,this.lowPercent=0,this.appearance="outline-fill",this.disabled=!1,this.fillType="range",this.groupSeparator=!1,this.max=100,this.min=0,this.rangeLabelType="percent",this.rangeLabels=!1,this.scale="m",this.unitLabel="",this.valueLabel=!1,this.valueLabelType="percent"}static{this.properties={currentPercent:[16,{},{state:!0}],highActive:[16,{},{state:!0}],highPercent:[16,{},{state:!0}],lowActive:[16,{},{state:!0}],lowPercent:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],fillType:[3,{},{reflect:!0}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],high:[11,{},{reflect:!0,type:Number}],label:1,low:[11,{},{reflect:!0,type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberingSystem:1,rangeLabelType:[3,{},{reflect:!0}],rangeLabels:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],unitLabel:1,value:[9,{},{type:Number}],valueLabel:[7,{},{reflect:!0,type:Boolean}],valueLabelType:[3,{},{reflect:!0}]}}static{this.styles=N}connectedCallback(){super.connectedCallback(),this.resizeObserver?.observe(this.el)}load(){this.calculateValues()}willUpdate(e){(e.has("min")&&(this.hasUpdated||this.min!==0)||e.has("max")&&(this.hasUpdated||this.max!==100)||e.has("low")||e.has("high")||e.has("value"))&&this.handleRangeChange(),(e.has("rangeLabels")&&(this.hasUpdated||this.rangeLabels!==!1)||e.has("rangeLabelType")&&(this.hasUpdated||this.rangeLabelType!=="percent")||e.has("unitLabel")&&(this.hasUpdated||this.unitLabel!=="")||e.has("valueLabel")&&(this.hasUpdated||this.valueLabel!==!1)||e.has("valueLabelType")&&(this.hasUpdated||this.valueLabelType!=="percent"))&&this.updateLabels()}loaded(){this.updateLabels()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}handleRangeChange(){this.calculateValues(),this.updateLabels()}resizeHandler(){this.updateLabels()}updateLabels(){this.determineValueLabelPosition(),this.determineVisibleLabels()}calculateValues(){let{min:e,max:l,low:t,high:a,value:i}=this,n=t===void 0?NaN:100*(t-e)/(l-e),s=a===void 0?NaN:100*(a-e)/(l-e),c=i===void 0?NaN:100*(i-e)/(l-e);(!t||t<e||a!==void 0&&t>a||t>l)&&(this.low=e),(!a||a>l||t!==void 0&&a<t||a<e)&&(this.high=l),i||(this.value=e),this.lowPercent=n,this.highPercent=s,this.currentPercent=i?c:0,this.lowActive=!!t&&t>e&&(!i||t>i)&&(!a||t<a),this.highActive=!!a&&e<=a&&a<l&&(!i||a>i)&&(!t||a>t)}formatLabel(e,l){if(l==="percent"){if(!this.percentFormatting){let t=this.messages._lang,a=new Intl.NumberFormat(t,{useGrouping:this.groupSeparator,style:"percent"});this.percentFormatting={formatter:a,locale:t}}return this.percentFormatting.formatter.format(e)}else return L.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},L.localize(e.toString())}getMeterKindCssClass(){let{low:e,high:l,min:t,max:a,value:i}=this,n=e||t,s=l||a,c=i!==void 0&&i>=n,d=i!==void 0&&i<n,f=i!==void 0&&i>=s,o=i!==void 0&&i<s;return!i||!e&&o||d?r.success:c&&o?r.warning:f?r.danger:r.success}intersects(e,l){return!!(e&&l&&V(e.getBoundingClientRect(),l.getBoundingClientRect()))}determineVisibleLabels(){if(!this.rangeLabels)return;let{minLabelRef:{value:e},lowLabelRef:{value:l},highLabelRef:{value:t},maxLabelRef:{value:a}}=this,i=this.intersects(t,a),n=this.intersects(l,t),s=this.intersects(l,a),c=this.intersects(e,t),d=this.intersects(e,l),f=this.intersects(e,a),o=r.labelHidden;l&&(d||s||n?l.classList.add(o):l.classList.remove(o)),t&&(c||s||i?t.classList.add(o):t.classList.remove(o)),e&&a&&(f?a.classList.add(o):a.classList.remove(o))}determineValueLabelPosition(){let{valueLabelRef:{value:e},meterContainerRef:{value:l},currentPercent:t}=this;if(!e||!l)return;let a=t>100?100:t>0?t:0,i=e.getBoundingClientRect().width,n=l.getBoundingClientRect().width,s=100*(i-0)/(n-0);a+s>=100?(e.style.insetInlineEnd="0%",e.style.removeProperty("inset-inline-start")):(e.style.insetInlineStart=`${a}% `,e.style.removeProperty("inset-inline-end"))}renderMeterFill(){let{currentPercent:e,fillType:l}=this,t=this.getMeterKindCssClass();return h`<div class=${b({[r.fill]:!0,[t]:l!=="single"})} style=${p({width:`${e}%`})}></div>`}renderRangeLine(e){let l={insetInlineStart:`${e}%`};return h`<div class=${b(r.stepLine)} style=${p(l)}></div>`}renderValueLabel(){let{currentPercent:e,valueLabelType:l,unitLabel:t,value:a}=this,i=this.formatLabel(l==="percent"?e/100:a||0,l);return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelValue]:!0})} ${m(this.valueLabelRef)}>${i}${t&&l!=="percent"&&h`<span class=${b(r.unitLabel)}>${t}</span>`||""}</div>`)}renderMinLabel(){let{rangeLabelType:e,min:l,minPercent:t,unitLabel:a}=this,i={insetInlineStart:`${t}%`},n=this.formatLabel(e==="percent"?t:l,e);return v("min-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(i)} ${m(this.minLabelRef)}>${n}${a&&e!=="percent"&&h`<span class=${b(r.unitLabel)}>${a}</span>`||""}</div>`)}renderLowLabel(){let{rangeLabelType:e,low:l,lowPercent:t,highPercent:a,labelFlipProximity:i}=this,n=l?this.formatLabel(e==="percent"?t/100:l,e):"",s={insetInlineStart:`${t}%`},c={insetInlineEnd:`${100-t}%`},d=(a-t)/100<i?c:s;return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(d)} ${m(this.lowLabelRef)}>${n}</div>`)}renderHighLabel(){let{rangeLabelType:e,high:l,highPercent:t,labelFlipMax:a}=this,i=l?this.formatLabel(e==="percent"?t/100:l,e):"",n={insetInlineStart:`${t}%`},s={insetInlineEnd:`${100-t}%`},c=t/100>=a?s:n;return v("high-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(c)} ${m(this.highLabelRef)}>${i}</div>`)}renderMaxLabel(){let{rangeLabelType:e,max:l,maxPercent:t}=this,a={insetInlineEnd:`${100-t}%`},i=this.formatLabel(e==="percent"?t/100:l,e);return v("max-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(a)} ${m(this.maxLabelRef)}>${i}</div>`)}render(){let{appearance:e,currentPercent:l,highActive:t,highPercent:a,label:i,lowActive:n,lowPercent:s,max:c,maxPercent:d,min:f,minPercent:o,rangeLabels:g,rangeLabelType:x,unitLabel:w,value:$,valueLabel:P,valueLabelType:R}=this,S=this.formatLabel(l/100,"percent"),F=`${$} ${w}`;return h`<div .ariaLabel=${i} .ariaValueMax=${x==="percent"?d:c} .ariaValueMin=${x==="percent"?o:f} .ariaValueNow=${R==="percent"?l:$} .ariaValueText=${R==="percent"?S:w?F:void 0} class=${b({[r.container]:!0,[r.stepsVisible]:g,[r.valueVisible]:P,[e]:e!=="outline-fill"})} role=meter ${m(this.meterContainerRef)}>${this.renderMeterFill()}${P&&this.renderValueLabel()||""}${n&&this.renderRangeLine(s)||""}${t&&this.renderRangeLine(a)||""}${g&&this.renderMinLabel()||""}${g&&n&&this.renderLowLabel()||""}${g&&t&&this.renderHighLabel()||""}${g&&this.renderMaxLabel()||""}</div>`}};C("calcite-meter",y);export{y as Meter};
2
+ import{m as L}from"./MBM7UIXE.js";import{a as v}from"./XIIT6OKF.js";import"./YP3AYJH3.js";import{a as T}from"./VI7SBYXT.js";import{a as M}from"./G64R54P5.js";import"./I5K6EDCU.js";import{t as V}from"./3QPETC2U.js";import{C as u,D as m,E as k,F as b,G as p,R as C,g as z,h}from"./RQONITLI.js";var r={container:"container",fill:"fill",stepLine:"step-line",label:"label",labelHidden:"label-hidden",labelRange:"label-range",labelValue:"label-value",unitLabel:"unit-label",stepsVisible:"steps-visible",valueVisible:"value-visible",success:"fill-success",warning:"fill-warning",danger:"fill-danger"},N=z`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host{display:flex;--calcite-internal-meter-space: var(--calcite-spacing-base);--calcite-internal-meter-height: var(--calcite-spacing-lg);--calcite-internal-meter-font-size: var(--calcite-font-size--1);--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand));--calcite-internal-meter-background-color: var(--calcite-meter-background-color, var(--calcite-color-foreground-2));--calcite-internal-meter-border-color: var(--calcite-meter-border-color, var(--calcite-color-border-2));--calcite-internal-meter-shadow: var(--calcite-meter-shadow, var(--calcite-shadow-none));--calcite-internal-meter-corner-radius: var(--calcite-meter-corner-radius, 9999px);--calcite-internal-meter-value-text-color: var(--calcite-meter-value-text-color, var(--calcite-color-text-1));--calcite-internal-meter-range-text-color: var(--calcite-meter-range-text-color, var(--calcite-color-text-3));--calcite-internal-meter-label-line-height: var(--calcite-font-line-height-base)}:host([scale=s]){--calcite-internal-meter-height: var(--calcite-spacing-md);--calcite-internal-meter-font-size: var(--calcite-font-size--2)}:host([scale=l]){--calcite-internal-meter-height: var(--calcite-spacing-xxl);--calcite-internal-meter-font-size: var(--calcite-font-size-0);--calcite-internal-meter-label-line-height: var(--calcite-font-line-height-md)}:host([appearance=solid]){--calcite-internal-meter-border-color: var(--calcite-color-foreground-3);--calcite-internal-meter-background-color: var(--calcite-color-foreground-3)}:host([appearance=outline]){--calcite-internal-meter-background-color: transparent}.fill{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand))}.fill-danger{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-danger))}.fill-success{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-success))}.fill-warning{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-warning))}.container{position:relative;display:flex;align-items:center;margin:0;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-internal-meter-height);background-color:var(--calcite-internal-meter-background-color);border:var(--calcite-border-width-sm) solid var(--calcite-internal-meter-border-color);border-radius:var(--calcite-internal-meter-corner-radius);box-shadow:var(--calcite-internal-meter-shadow)}.value-visible{margin-block-start:var(--calcite-spacing-xxl)}.steps-visible{margin-block-end:var(--calcite-spacing-xxl)}.step-line{position:absolute;inset-block:0px;display:block;inline-size:var(--calcite-internal-meter-space);background-color:var(--calcite-internal-meter-border-color)}.label{position:absolute;display:flex;gap:var(--calcite-spacing-xxs);font-size:var(--calcite-internal-meter-font-size);line-height:var(--calcite-internal-meter-label-line-height)}.label-hidden{visibility:hidden;opacity:0}.label-value{inset-block-end:calc(100% + .5em);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-internal-meter-value-text-color)}.label-range{color:var(--calcite-internal-meter-range-text-color);inset-block-start:calc(100% + .5em)}.label-range .unit-label{font-weight:var(--calcite-font-weight-medium)}.fill{position:absolute;z-index:var(--calcite-z-index);display:block;transition-timing-function:cubic-bezier(.4,0,.2,1);inset-inline-start:var(--calcite-internal-meter-space);inset-block:var(--calcite-internal-meter-space);border-radius:var(--calcite-internal-meter-corner-radius);max-inline-size:calc(100% - var(--calcite-internal-meter-space) * 2);min-inline-size:calc(var(--calcite-internal-meter-height) - var(--calcite-internal-meter-space) * 2);background-color:var(--calcite-internal-meter-fill-color);transition-property:inline-size,background-color,box-shadow}.solid .fill{inset-block:0;inset-inline-start:0;max-inline-size:100%;min-inline-size:calc(var(--calcite-internal-meter-height));box-shadow:0 0 0 1px var(--calcite-internal-meter-fill-color)}`,y=class extends k{constructor(){super(...arguments),this.highLabelRef=u(),this.labelFlipMax=.8,this.labelFlipProximity=.15,this.lowLabelRef=u(),this.maxLabelRef=u(),this.maxPercent=100,this.messages=M({name:null}),this.meterContainerRef=u(),this.minLabelRef=u(),this.minPercent=0,this.resizeObserver=T("resize",()=>this.resizeHandler()),this.valueLabelRef=u(),this.currentPercent=0,this.highActive=!1,this.highPercent=100,this.lowActive=!1,this.lowPercent=0,this.appearance="outline-fill",this.disabled=!1,this.fillType="range",this.groupSeparator=!1,this.max=100,this.min=0,this.rangeLabelType="percent",this.rangeLabels=!1,this.scale="m",this.unitLabel="",this.valueLabel=!1,this.valueLabelType="percent"}static{this.properties={currentPercent:[16,{},{state:!0}],highActive:[16,{},{state:!0}],highPercent:[16,{},{state:!0}],lowActive:[16,{},{state:!0}],lowPercent:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],fillType:[3,{},{reflect:!0}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],high:[11,{},{reflect:!0,type:Number}],label:1,low:[11,{},{reflect:!0,type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberingSystem:1,rangeLabelType:[3,{},{reflect:!0}],rangeLabels:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],unitLabel:1,value:[9,{},{type:Number}],valueLabel:[7,{},{reflect:!0,type:Boolean}],valueLabelType:[3,{},{reflect:!0}]}}static{this.styles=N}connectedCallback(){super.connectedCallback(),this.resizeObserver?.observe(this.el)}load(){this.calculateValues()}willUpdate(e){(e.has("min")&&(this.hasUpdated||this.min!==0)||e.has("max")&&(this.hasUpdated||this.max!==100)||e.has("low")||e.has("high")||e.has("value"))&&this.handleRangeChange(),(e.has("rangeLabels")&&(this.hasUpdated||this.rangeLabels!==!1)||e.has("rangeLabelType")&&(this.hasUpdated||this.rangeLabelType!=="percent")||e.has("unitLabel")&&(this.hasUpdated||this.unitLabel!=="")||e.has("valueLabel")&&(this.hasUpdated||this.valueLabel!==!1)||e.has("valueLabelType")&&(this.hasUpdated||this.valueLabelType!=="percent"))&&this.updateLabels()}loaded(){this.updateLabels()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}handleRangeChange(){this.calculateValues(),this.updateLabels()}resizeHandler(){this.updateLabels()}updateLabels(){this.determineValueLabelPosition(),this.determineVisibleLabels()}calculateValues(){let{min:e,max:l,low:t,high:a,value:i}=this,n=t===void 0?NaN:100*(t-e)/(l-e),s=a===void 0?NaN:100*(a-e)/(l-e),c=i===void 0?NaN:100*(i-e)/(l-e);(!t||t<e||a!==void 0&&t>a||t>l)&&(this.low=e),(!a||a>l||t!==void 0&&a<t||a<e)&&(this.high=l),i||(this.value=e),this.lowPercent=n,this.highPercent=s,this.currentPercent=i?c:0,this.lowActive=!!t&&t>e&&(!i||t>i)&&(!a||t<a),this.highActive=!!a&&e<=a&&a<l&&(!i||a>i)&&(!t||a>t)}formatLabel(e,l){if(l==="percent"){if(!this.percentFormatting){let t=this.messages._lang,a=new Intl.NumberFormat(t,{useGrouping:this.groupSeparator,style:"percent"});this.percentFormatting={formatter:a,locale:t}}return this.percentFormatting.formatter.format(e)}else return L.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},L.localize(e.toString())}getMeterKindCssClass(){let{low:e,high:l,min:t,max:a,value:i}=this,n=e||t,s=l||a,c=i!==void 0&&i>=n,d=i!==void 0&&i<n,f=i!==void 0&&i>=s,o=i!==void 0&&i<s;return!i||!e&&o||d?r.success:c&&o?r.warning:f?r.danger:r.success}intersects(e,l){return!!(e&&l&&V(e.getBoundingClientRect(),l.getBoundingClientRect()))}determineVisibleLabels(){if(!this.rangeLabels)return;let{minLabelRef:{value:e},lowLabelRef:{value:l},highLabelRef:{value:t},maxLabelRef:{value:a}}=this,i=this.intersects(t,a),n=this.intersects(l,t),s=this.intersects(l,a),c=this.intersects(e,t),d=this.intersects(e,l),f=this.intersects(e,a),o=r.labelHidden;l&&(d||s||n?l.classList.add(o):l.classList.remove(o)),t&&(c||s||i?t.classList.add(o):t.classList.remove(o)),e&&a&&(f?a.classList.add(o):a.classList.remove(o))}determineValueLabelPosition(){let{valueLabelRef:{value:e},meterContainerRef:{value:l},currentPercent:t}=this;if(!e||!l)return;let a=t>100?100:t>0?t:0,i=e.getBoundingClientRect().width,n=l.getBoundingClientRect().width,s=100*(i-0)/(n-0);a+s>=100?(e.style.insetInlineEnd="0%",e.style.removeProperty("inset-inline-start")):(e.style.insetInlineStart=`${a}% `,e.style.removeProperty("inset-inline-end"))}renderMeterFill(){let{currentPercent:e,fillType:l}=this,t=this.getMeterKindCssClass();return h`<div class=${b({[r.fill]:!0,[t]:l!=="single"})} style=${p({width:`${e}%`})}></div>`}renderRangeLine(e){let l={insetInlineStart:`${e}%`};return h`<div class=${b(r.stepLine)} style=${p(l)}></div>`}renderValueLabel(){let{currentPercent:e,valueLabelType:l,unitLabel:t,value:a}=this,i=this.formatLabel(l==="percent"?e/100:a||0,l);return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelValue]:!0})} ${m(this.valueLabelRef)}>${i}${t&&l!=="percent"&&h`<span class=${b(r.unitLabel)}>${t}</span>`||""}</div>`)}renderMinLabel(){let{rangeLabelType:e,min:l,minPercent:t,unitLabel:a}=this,i={insetInlineStart:`${t}%`},n=this.formatLabel(e==="percent"?t:l,e);return v("min-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(i)} ${m(this.minLabelRef)}>${n}${a&&e!=="percent"&&h`<span class=${b(r.unitLabel)}>${a}</span>`||""}</div>`)}renderLowLabel(){let{rangeLabelType:e,low:l,lowPercent:t,highPercent:a,labelFlipProximity:i}=this,n=l?this.formatLabel(e==="percent"?t/100:l,e):"",s={insetInlineStart:`${t}%`},c={insetInlineEnd:`${100-t}%`},d=(a-t)/100<i?c:s;return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(d)} ${m(this.lowLabelRef)}>${n}</div>`)}renderHighLabel(){let{rangeLabelType:e,high:l,highPercent:t,labelFlipMax:a}=this,i=l?this.formatLabel(e==="percent"?t/100:l,e):"",n={insetInlineStart:`${t}%`},s={insetInlineEnd:`${100-t}%`},c=t/100>=a?s:n;return v("high-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(c)} ${m(this.highLabelRef)}>${i}</div>`)}renderMaxLabel(){let{rangeLabelType:e,max:l,maxPercent:t}=this,a={insetInlineEnd:`${100-t}%`},i=this.formatLabel(e==="percent"?t/100:l,e);return v("max-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(a)} ${m(this.maxLabelRef)}>${i}</div>`)}render(){let{appearance:e,currentPercent:l,highActive:t,highPercent:a,label:i,lowActive:n,lowPercent:s,max:c,maxPercent:d,min:f,minPercent:o,rangeLabels:g,rangeLabelType:x,unitLabel:w,value:$,valueLabel:P,valueLabelType:R}=this,S=this.formatLabel(l/100,"percent"),F=`${$} ${w}`;return h`<div .ariaLabel=${i} .ariaValueMax=${x==="percent"?d:c} .ariaValueMin=${x==="percent"?o:f} .ariaValueNow=${R==="percent"?l:$} .ariaValueText=${R==="percent"?S:w?F:void 0} class=${b({[r.container]:!0,[r.stepsVisible]:g,[r.valueVisible]:P,[e]:e!=="outline-fill"})} role=meter ${m(this.meterContainerRef)}>${this.renderMeterFill()}${P&&this.renderValueLabel()||""}${n&&this.renderRangeLine(s)||""}${t&&this.renderRangeLine(a)||""}${g&&this.renderMinLabel()||""}${g&&n&&this.renderLowLabel()||""}${g&&t&&this.renderHighLabel()||""}${g&&this.renderMaxLabel()||""}</div>`}};C("calcite-meter",y);export{y as Meter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as M,b as P,c as w,d as A}from"./MCCTYHDW.js";import{a as u,b as n,c as l,h as r,j as m,k as v,m as f,n as c,p as D}from"./RYA2FB6F.js";import{m as k,n as $}from"./MBM7UIXE.js";import{e as z}from"./VXDPJESZ.js";import"./YP3AYJH3.js";import{a as C}from"./XPKPBZJW.js";import{a as b}from"./GBM4SNW6.js";import"./ZWPNZ5XW.js";import"./37IBLWMI.js";import"./3OUBYTMI.js";import{E as x,F as S,O as R,R as E,g as y,h as d,p as g}from"./XXSF7VUB.js";var F=2,O={dateStyle:"full"},B={container:"container"},I=y`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{display:inline-block;inline-size:100%;overflow:visible;border-width:1px;border-style:solid;vertical-align:top;border-color:var(--calcite-date-picker-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-date-picker-corner-radius, var(--calcite-corner-radius))}:host([scale=s]){inline-size:236px;min-inline-size:216px;max-inline-size:380px}:host([scale=s][range][layout=horizontal][calendars="2"]){inline-size:480px;min-inline-size:432px;max-inline-size:772px}:host([scale=m]){inline-size:298px;min-inline-size:272px;max-inline-size:480px}:host([scale=m][layout=horizontal][range][calendars="2"]){inline-size:608px;min-inline-size:544px;max-inline-size:972px}:host([scale=l]){inline-size:334px;min-inline-size:320px;max-inline-size:600px}:host([scale=l][layout=horizontal][range][calendars="2"]){inline-size:684px;min-inline-size:640px;max-inline-size:1212px}.container{outline:2px solid transparent;outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`,p=class extends x{constructor(){super(),this.rangeValueChangedByUser=!1,this.messages=C({blocking:!0}),this.focusSetter=b()(this),this.calendars=2,this.layout="horizontal",this.monthStyle="wide",this.proximitySelectionDisabled=!1,this.range=!1,this.scale="m",this.calciteDatePickerChange=g({cancelable:!1}),this.calciteDatePickerRangeChange=g({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={activeEndDate:[16,{},{state:!0}],activeStartDate:[16,{},{state:!0}],dateTimeFormat:[16,{},{state:!0}],hoverRange:[16,{},{state:!0}],localeData:[16,{},{state:!0}],activeDate:[0,{},{attribute:!1}],activeRange:[3,{},{reflect:!0}],calendars:[11,{},{type:Number,reflect:!0}],headingLevel:[11,{},{type:Number,reflect:!0}],layout:[3,{},{reflect:!0}],max:[3,{},{reflect:!0}],maxAsDate:[0,{},{attribute:!1}],messageOverrides:[0,{},{attribute:!1}],min:[3,{},{reflect:!0}],minAsDate:[0,{},{attribute:!1}],monthStyle:1,numberingSystem:[3,{},{reflect:!0}],proximitySelectionDisabled:[7,{},{reflect:!0,type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],value:1,valueAsDate:[0,{},{attribute:!1}]}}static{this.styles=I}async reset(){this.resetActiveDates(),this.rangeValueChangedByUser=!1}async setFocus(t){return this.focusSetter(()=>this.el,t)}async load(){await this.loadLocaleData()}willUpdate(t){let e=t.get("valueAsDate"),a=this.valueAsDate,i=this.rangeValueChangedByUser&&!t.has("value")&&this.range&&z(e,a),s=t.has("value")&&t.has("valueAsDate");this.rangeValueChangedByUser&&!s&&!i&&(this.rangeValueChangedByUser=!1),t.has("value")&&this.valueHandler(this.value),t.has("valueAsDate")&&this.valueAsDateWatcher(this.valueAsDate),i&&(this.rangeValueChangedByUser=!1);let h=A(t,"min"),o=A(t,"max");h==="min"?this.minAsDate=this.min?l(this.min):void 0:h==="minAsDate"&&(this.minAsDate=l(r(this.minAsDate))),o==="max"?this.maxAsDate=this.max?l(this.max):void 0:o==="maxAsDate"&&(this.maxAsDate=l(r(this.maxAsDate))),(t.has("range")&&this.range||t.has("maxAsDate")||t.has("minAsDate"))&&this.setActiveStartAndEndDates(),t.has("activeDate")&&this.hasUpdated&&this.activeDateWatcher(this.activeDate),t.has("messages")&&this.hasUpdated&&this.loadLocaleData().catch(R.error)}activeDateWatcher(t){this.range&&(t?(this.activeStartDate=t,this.activeEndDate=c(this.activeStartDate)):this.resetActiveDates())}valueHandler(t){Array.isArray(t)?(this.valueAsDate=t.every(e=>e==="")?void 0:w(t),this.rangeValueChangedByUser||this.resetActiveDates()):t?this.valueAsDate=l(t):(this.valueAsDate=void 0,this.resetActiveDates())}valueAsDateWatcher(t){this.range&&Array.isArray(t)&&!this.rangeValueChangedByUser?this.setActiveStartAndEndDates():this.range||(t&&t!==this.activeDate?this.activeDate=t:t||this.resetActiveDates())}keyDownHandler(t){t.key==="Escape"&&this.resetActiveDates()}async loadLocaleData(){if(!1)return;let t=P(this.messages._lang);k.numberFormatOptions={numberingSystem:this.numberingSystem,locale:t,useGrouping:!1},this.localeData=await M(t),this.dateTimeFormat=$(t,O)}monthHeaderSelectChange(t){let e=new Date(t.detail.date),a=t.detail.position;this.range?a==="end"?(this.activeEndDate=e,this.activeStartDate=v(e)):(this.activeStartDate=e,this.activeEndDate=c(e)):this.activeDate=e,t.stopPropagation()}monthActiveDateChange(t){let e=new Date(t.detail);if(!this.range)this.activeDate=e;else{let a=e.getMonth(),i=a!==this.activeStartDate?.getMonth()&&(this.calendars===1||(this.activeStartDate?a!==c(this.activeStartDate).getMonth():!1));this.activeRange==="end"?(!this.activeEndDate||this.activeStartDate&&i)&&(this.activeEndDate=e,this.activeStartDate=v(e)):(this.activeStartDate&&i||!this.activeStartDate)&&(this.activeStartDate=e,this.activeEndDate=c(e))}t.stopPropagation()}monthHoverChange(t){if(!this.range){this.hoverRange=void 0;return}let{valueAsDate:e}=this,a=Array.isArray(e)?e[0]:void 0,i=Array.isArray(e)?e[1]:void 0,s=new Date(t.detail);if(this.hoverRange={focused:this.activeRange||"start",start:a,end:i},this.proximitySelectionDisabled)i&&a||!i&&a&&s>=a?(this.hoverRange.focused="end",this.hoverRange.end=s):!i&&a&&s<a?this.hoverRange={focused:"start",start:s,end:a}:this.hoverRange=void 0;else if(this.activeRange&&this.hoverRange)this.activeRange==="end"?(this.hoverRange.end=s,this.hoverRange.focused="end"):(this.hoverRange.start=s,this.hoverRange.focused="start");else if(a&&i){let h=Math.abs(D(s,a)),o=Math.abs(D(s,i));s>i?(this.hoverRange.end=s,this.hoverRange.focused="end"):s<a?(this.hoverRange.start=s,this.hoverRange.focused="start"):s>a&&s<i&&(h<o?(this.hoverRange.start=s,this.hoverRange.focused="start"):(this.hoverRange.end=s,this.hoverRange.focused="end"))}else a&&(s<a?this.hoverRange={focused:"start",start:s,end:a}:(this.hoverRange.end=s,this.hoverRange.focused="end"));t.stopPropagation()}monthMouseOutChange(t){this.hoverRange&&(this.hoverRange=void 0),t.stopPropagation()}resetActiveDates(){let{valueAsDate:t}=this;if(!Array.isArray(t)){if(t&&t!==this.activeDate)this.activeDate=new Date(t);else if(!t){this.activeDate=void 0;let e=this.getActiveDate(void 0,this.minAsDate,this.maxAsDate);this.range?(this.activeStartDate=e,this.activeEndDate=void 0):this.activeDate=e}}Array.isArray(t)&&(t[0]&&t[0]!==this.activeStartDate?this.activeStartDate=new Date(t[0]):t[0]||(this.activeStartDate=this.getActiveDate(void 0,this.minAsDate,this.maxAsDate)),t[1]&&t[1]!==this.activeEndDate?this.activeEndDate=new Date(t[1]):t[1]||(this.activeEndDate=void 0)),this.hoverRange=void 0}getEndDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[1]||void 0}setEndDate(t,e=!0){let a=this.getStartDate();this.rangeValueChangedByUser=!0,this.value=[r(a),r(t)],this.valueAsDate=[a,t],e&&this.calciteDatePickerRangeChange.emit()}getStartDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[0]||void 0}setStartDate(t,e=!0){let a=this.getEndDate();this.rangeValueChangedByUser=!0,this.value=[r(t),r(a)],this.valueAsDate=[t,a],e&&this.calciteDatePickerRangeChange.emit()}monthDateChange(t){let e=new Date(t.detail),a=r(e);if(!this.range&&a===r(this.valueAsDate))return;if(!this.range){this.value=a||"",this.valueAsDate=e||void 0,this.activeDate=e||void 0,this.calciteDatePickerChange.emit();return}let i=this.getStartDate(),s=this.getEndDate();if(!i||!s&&e<i)i&&this.setEndDate(new Date(i)),this.activeRange=="end"?this.setEndDate(e):this.setStartDate(e);else if(!s)this.setEndDate(e);else if(this.proximitySelectionDisabled)this.setStartDate(e,!1),this.setEndDate(void 0,!1),this.calciteDatePickerRangeChange.emit();else if(this.activeRange)this.activeRange=="end"?this.setEndDate(e):(e>s&&(this.setEndDate(void 0,!1),this.activeEndDate=void 0),this.setStartDate(e));else{let h=D(e,i),o=D(e,s);o===0||h<0?this.setStartDate(e):h===0||o<0?this.setEndDate(e):h<o?this.setStartDate(e):this.setEndDate(e)}t.stopPropagation(),this.calciteDatePickerChange.emit()}getActiveDate(t,e,a){let i=n(new Date,e,a);return n(this.activeDate,e,a)||t||(m(a,i)&&!this.range?f(i,e,a):i)}getActiveEndDate(t,e,a){return n(this.activeEndDate,e,a)||t||n(c(new Date),e,a)}setActiveStartAndEndDates(){if(this.range){let t=n(Array.isArray(this.valueAsDate)?this.valueAsDate[0]:this.valueAsDate,this.minAsDate,this.maxAsDate),e=n(Array.isArray(this.valueAsDate)?this.valueAsDate[1]:void 0,this.minAsDate,this.maxAsDate);if(this.activeStartDate=this.getActiveDate(t,this.minAsDate,this.maxAsDate),this.activeEndDate=this.getActiveEndDate(e,this.minAsDate,this.maxAsDate),m(this.activeStartDate,this.activeEndDate)){let a=f(this.activeEndDate?v(this.activeEndDate):void 0,this.minAsDate,this.maxAsDate),i=this.activeEndDate?c(this.activeEndDate):void 0;u(a,this.minAsDate,this.maxAsDate)?this.activeStartDate=a:u(i,this.minAsDate,this.maxAsDate)&&(this.activeEndDate=i)}}}render(){let t=n(this.range&&Array.isArray(this.valueAsDate)?this.valueAsDate[0]:this.valueAsDate,this.minAsDate,this.maxAsDate),e=this.getActiveDate(t,this.minAsDate,this.maxAsDate),a=this.range&&Array.isArray(this.valueAsDate)?n(this.valueAsDate[1],this.minAsDate,this.maxAsDate):void 0,i=this.range&&this.activeRange?this.activeRange==="start"?this.minAsDate:t:this.minAsDate,s=this.range?this.activeStartDate:e;return d`<div aria-hidden class=${S(B.container)} tabindex=-1>${this.renderMonth(s,this.maxAsDate,i,t,a)}</div>`}renderMonth(t,e,a,i,s){return d`<calcite-date-picker-month .activeDate=${t} .calendars=${this.calendars} .dateTimeFormat=${this.dateTimeFormat} .endDate=${this.range?s:void 0} .headingLevel=${this.headingLevel||F} .hoverRange=${this.hoverRange} .layout=${this.layout} .localeData=${this.localeData} .max=${e} .messages=${this.messages} .min=${a} .monthStyle=${this.monthStyle} @calciteInternalDatePickerDayHover=${this.monthHoverChange} @calciteInternalDatePickerDaySelect=${this.monthDateChange} @calciteInternalDatePickerMonthActiveDateChange=${this.monthActiveDateChange} @calciteInternalDatePickerMonthChange=${this.monthHeaderSelectChange} @calciteInternalDatePickerMonthMouseOut=${this.monthMouseOutChange} .range=${this.range} .scale=${this.scale} .selectedDate=${this.activeRange==="end"?s:i} .startDate=${this.range?i:void 0}></calcite-date-picker-month>`}};E("calcite-date-picker",p);export{p as DatePicker};
2
+ import{a as M,b as P,c as w,d as A}from"./OIIMG6T7.js";import{a as u,b as n,c as l,h as r,j as m,k as v,m as f,n as c,p as D}from"./RYA2FB6F.js";import{m as k,n as $}from"./MBM7UIXE.js";import{e as z}from"./VXDPJESZ.js";import"./YP3AYJH3.js";import{a as C}from"./G64R54P5.js";import{a as b}from"./PW7YMRBF.js";import"./ZWPNZ5XW.js";import"./I5K6EDCU.js";import"./3QPETC2U.js";import{E as x,F as S,O as R,R as E,g as y,h as d,p as g}from"./RQONITLI.js";var F=2,O={dateStyle:"full"},B={container:"container"},I=y`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{display:inline-block;inline-size:100%;overflow:visible;border-width:1px;border-style:solid;vertical-align:top;border-color:var(--calcite-date-picker-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-date-picker-corner-radius, var(--calcite-corner-radius))}:host([scale=s]){inline-size:236px;min-inline-size:216px;max-inline-size:380px}:host([scale=s][range][layout=horizontal][calendars="2"]){inline-size:480px;min-inline-size:432px;max-inline-size:772px}:host([scale=m]){inline-size:298px;min-inline-size:272px;max-inline-size:480px}:host([scale=m][layout=horizontal][range][calendars="2"]){inline-size:608px;min-inline-size:544px;max-inline-size:972px}:host([scale=l]){inline-size:334px;min-inline-size:320px;max-inline-size:600px}:host([scale=l][layout=horizontal][range][calendars="2"]){inline-size:684px;min-inline-size:640px;max-inline-size:1212px}.container{outline:2px solid transparent;outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`,p=class extends x{constructor(){super(),this.rangeValueChangedByUser=!1,this.messages=C({blocking:!0}),this.focusSetter=b()(this),this.calendars=2,this.layout="horizontal",this.monthStyle="wide",this.proximitySelectionDisabled=!1,this.range=!1,this.scale="m",this.calciteDatePickerChange=g({cancelable:!1}),this.calciteDatePickerRangeChange=g({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={activeEndDate:[16,{},{state:!0}],activeStartDate:[16,{},{state:!0}],dateTimeFormat:[16,{},{state:!0}],hoverRange:[16,{},{state:!0}],localeData:[16,{},{state:!0}],activeDate:[0,{},{attribute:!1}],activeRange:[3,{},{reflect:!0}],calendars:[11,{},{type:Number,reflect:!0}],headingLevel:[11,{},{type:Number,reflect:!0}],layout:[3,{},{reflect:!0}],max:[3,{},{reflect:!0}],maxAsDate:[0,{},{attribute:!1}],messageOverrides:[0,{},{attribute:!1}],min:[3,{},{reflect:!0}],minAsDate:[0,{},{attribute:!1}],monthStyle:1,numberingSystem:[3,{},{reflect:!0}],proximitySelectionDisabled:[7,{},{reflect:!0,type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],value:1,valueAsDate:[0,{},{attribute:!1}]}}static{this.styles=I}async reset(){this.resetActiveDates(),this.rangeValueChangedByUser=!1}async setFocus(t){return this.focusSetter(()=>this.el,t)}async load(){await this.loadLocaleData()}willUpdate(t){let e=t.get("valueAsDate"),a=this.valueAsDate,i=this.rangeValueChangedByUser&&!t.has("value")&&this.range&&z(e,a),s=t.has("value")&&t.has("valueAsDate");this.rangeValueChangedByUser&&!s&&!i&&(this.rangeValueChangedByUser=!1),t.has("value")&&this.valueHandler(this.value),t.has("valueAsDate")&&this.valueAsDateWatcher(this.valueAsDate),i&&(this.rangeValueChangedByUser=!1);let h=A(t,"min"),o=A(t,"max");h==="min"?this.minAsDate=this.min?l(this.min):void 0:h==="minAsDate"&&(this.minAsDate=l(r(this.minAsDate))),o==="max"?this.maxAsDate=this.max?l(this.max):void 0:o==="maxAsDate"&&(this.maxAsDate=l(r(this.maxAsDate))),(t.has("range")&&this.range||t.has("maxAsDate")||t.has("minAsDate"))&&this.setActiveStartAndEndDates(),t.has("activeDate")&&this.hasUpdated&&this.activeDateWatcher(this.activeDate),t.has("messages")&&this.hasUpdated&&this.loadLocaleData().catch(R.error)}activeDateWatcher(t){this.range&&(t?(this.activeStartDate=t,this.activeEndDate=c(this.activeStartDate)):this.resetActiveDates())}valueHandler(t){Array.isArray(t)?(this.valueAsDate=t.every(e=>e==="")?void 0:w(t),this.rangeValueChangedByUser||this.resetActiveDates()):t?this.valueAsDate=l(t):(this.valueAsDate=void 0,this.resetActiveDates())}valueAsDateWatcher(t){this.range&&Array.isArray(t)&&!this.rangeValueChangedByUser?this.setActiveStartAndEndDates():this.range||(t&&t!==this.activeDate?this.activeDate=t:t||this.resetActiveDates())}keyDownHandler(t){t.key==="Escape"&&this.resetActiveDates()}async loadLocaleData(){if(!1)return;let t=P(this.messages._lang);k.numberFormatOptions={numberingSystem:this.numberingSystem,locale:t,useGrouping:!1},this.localeData=await M(t),this.dateTimeFormat=$(t,O)}monthHeaderSelectChange(t){let e=new Date(t.detail.date),a=t.detail.position;this.range?a==="end"?(this.activeEndDate=e,this.activeStartDate=v(e)):(this.activeStartDate=e,this.activeEndDate=c(e)):this.activeDate=e,t.stopPropagation()}monthActiveDateChange(t){let e=new Date(t.detail);if(!this.range)this.activeDate=e;else{let a=e.getMonth(),i=a!==this.activeStartDate?.getMonth()&&(this.calendars===1||(this.activeStartDate?a!==c(this.activeStartDate).getMonth():!1));this.activeRange==="end"?(!this.activeEndDate||this.activeStartDate&&i)&&(this.activeEndDate=e,this.activeStartDate=v(e)):(this.activeStartDate&&i||!this.activeStartDate)&&(this.activeStartDate=e,this.activeEndDate=c(e))}t.stopPropagation()}monthHoverChange(t){if(!this.range){this.hoverRange=void 0;return}let{valueAsDate:e}=this,a=Array.isArray(e)?e[0]:void 0,i=Array.isArray(e)?e[1]:void 0,s=new Date(t.detail);if(this.hoverRange={focused:this.activeRange||"start",start:a,end:i},this.proximitySelectionDisabled)i&&a||!i&&a&&s>=a?(this.hoverRange.focused="end",this.hoverRange.end=s):!i&&a&&s<a?this.hoverRange={focused:"start",start:s,end:a}:this.hoverRange=void 0;else if(this.activeRange&&this.hoverRange)this.activeRange==="end"?(this.hoverRange.end=s,this.hoverRange.focused="end"):(this.hoverRange.start=s,this.hoverRange.focused="start");else if(a&&i){let h=Math.abs(D(s,a)),o=Math.abs(D(s,i));s>i?(this.hoverRange.end=s,this.hoverRange.focused="end"):s<a?(this.hoverRange.start=s,this.hoverRange.focused="start"):s>a&&s<i&&(h<o?(this.hoverRange.start=s,this.hoverRange.focused="start"):(this.hoverRange.end=s,this.hoverRange.focused="end"))}else a&&(s<a?this.hoverRange={focused:"start",start:s,end:a}:(this.hoverRange.end=s,this.hoverRange.focused="end"));t.stopPropagation()}monthMouseOutChange(t){this.hoverRange&&(this.hoverRange=void 0),t.stopPropagation()}resetActiveDates(){let{valueAsDate:t}=this;if(!Array.isArray(t)){if(t&&t!==this.activeDate)this.activeDate=new Date(t);else if(!t){this.activeDate=void 0;let e=this.getActiveDate(void 0,this.minAsDate,this.maxAsDate);this.range?(this.activeStartDate=e,this.activeEndDate=void 0):this.activeDate=e}}Array.isArray(t)&&(t[0]&&t[0]!==this.activeStartDate?this.activeStartDate=new Date(t[0]):t[0]||(this.activeStartDate=this.getActiveDate(void 0,this.minAsDate,this.maxAsDate)),t[1]&&t[1]!==this.activeEndDate?this.activeEndDate=new Date(t[1]):t[1]||(this.activeEndDate=void 0)),this.hoverRange=void 0}getEndDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[1]||void 0}setEndDate(t,e=!0){let a=this.getStartDate();this.rangeValueChangedByUser=!0,this.value=[r(a),r(t)],this.valueAsDate=[a,t],e&&this.calciteDatePickerRangeChange.emit()}getStartDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[0]||void 0}setStartDate(t,e=!0){let a=this.getEndDate();this.rangeValueChangedByUser=!0,this.value=[r(t),r(a)],this.valueAsDate=[t,a],e&&this.calciteDatePickerRangeChange.emit()}monthDateChange(t){let e=new Date(t.detail),a=r(e);if(!this.range&&a===r(this.valueAsDate))return;if(!this.range){this.value=a||"",this.valueAsDate=e||void 0,this.activeDate=e||void 0,this.calciteDatePickerChange.emit();return}let i=this.getStartDate(),s=this.getEndDate();if(!i||!s&&e<i)i&&this.setEndDate(new Date(i)),this.activeRange=="end"?this.setEndDate(e):this.setStartDate(e);else if(!s)this.setEndDate(e);else if(this.proximitySelectionDisabled)this.setStartDate(e,!1),this.setEndDate(void 0,!1),this.calciteDatePickerRangeChange.emit();else if(this.activeRange)this.activeRange=="end"?this.setEndDate(e):(e>s&&(this.setEndDate(void 0,!1),this.activeEndDate=void 0),this.setStartDate(e));else{let h=D(e,i),o=D(e,s);o===0||h<0?this.setStartDate(e):h===0||o<0?this.setEndDate(e):h<o?this.setStartDate(e):this.setEndDate(e)}t.stopPropagation(),this.calciteDatePickerChange.emit()}getActiveDate(t,e,a){let i=n(new Date,e,a);return n(this.activeDate,e,a)||t||(m(a,i)&&!this.range?f(i,e,a):i)}getActiveEndDate(t,e,a){return n(this.activeEndDate,e,a)||t||n(c(new Date),e,a)}setActiveStartAndEndDates(){if(this.range){let t=n(Array.isArray(this.valueAsDate)?this.valueAsDate[0]:this.valueAsDate,this.minAsDate,this.maxAsDate),e=n(Array.isArray(this.valueAsDate)?this.valueAsDate[1]:void 0,this.minAsDate,this.maxAsDate);if(this.activeStartDate=this.getActiveDate(t,this.minAsDate,this.maxAsDate),this.activeEndDate=this.getActiveEndDate(e,this.minAsDate,this.maxAsDate),m(this.activeStartDate,this.activeEndDate)){let a=f(this.activeEndDate?v(this.activeEndDate):void 0,this.minAsDate,this.maxAsDate),i=this.activeEndDate?c(this.activeEndDate):void 0;u(a,this.minAsDate,this.maxAsDate)?this.activeStartDate=a:u(i,this.minAsDate,this.maxAsDate)&&(this.activeEndDate=i)}}}render(){let t=n(this.range&&Array.isArray(this.valueAsDate)?this.valueAsDate[0]:this.valueAsDate,this.minAsDate,this.maxAsDate),e=this.getActiveDate(t,this.minAsDate,this.maxAsDate),a=this.range&&Array.isArray(this.valueAsDate)?n(this.valueAsDate[1],this.minAsDate,this.maxAsDate):void 0,i=this.range&&this.activeRange?this.activeRange==="start"?this.minAsDate:t:this.minAsDate,s=this.range?this.activeStartDate:e;return d`<div aria-hidden class=${S(B.container)} tabindex=-1>${this.renderMonth(s,this.maxAsDate,i,t,a)}</div>`}renderMonth(t,e,a,i,s){return d`<calcite-date-picker-month .activeDate=${t} .calendars=${this.calendars} .dateTimeFormat=${this.dateTimeFormat} .endDate=${this.range?s:void 0} .headingLevel=${this.headingLevel||F} .hoverRange=${this.hoverRange} .layout=${this.layout} .localeData=${this.localeData} .max=${e} .messages=${this.messages} .min=${a} .monthStyle=${this.monthStyle} @calciteInternalDatePickerDayHover=${this.monthHoverChange} @calciteInternalDatePickerDaySelect=${this.monthDateChange} @calciteInternalDatePickerMonthActiveDateChange=${this.monthActiveDateChange} @calciteInternalDatePickerMonthChange=${this.monthHeaderSelectChange} @calciteInternalDatePickerMonthMouseOut=${this.monthMouseOutChange} .range=${this.range} .scale=${this.scale} .selectedDate=${this.activeRange==="end"?s:i} .startDate=${this.range?i:void 0}></calcite-date-picker-month>`}};E("calcite-date-picker",p);export{p as DatePicker};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{D as $,F as e,h as n,l as s}from"./XXSF7VUB.js";var a={container:"inline-edit--container",enableEditing:"enable-editing",confirmChanges:"confirm-changes",cancelEditing:"cancel-editing"},C=({cancelEditingLabel:t,confirmChangesLabel:i,inlineEditing:o,enableEditingLabel:c,enableEditingButtonRef:d,loading:l,onCancelEditing:p,onConfirmChanges:m,onEnableEditing:u,scale:r,showControls:g})=>n`<div class=${e(a.container)}>${!o&&n`<calcite-action .ariaLabel=${c} class=${e(a.enableEditing)} icon=pencil @click=${u} .scale=${r} .text=${c} title=${c??s} type=button ${$(d)}></calcite-action>`||""}${g&&[n`<calcite-action .ariaLabel=${i} class=${e(a.confirmChanges)} .disabled=${l} icon=check .loading=${l} @click=${m} .scale=${r} .text=${i} title=${i??s} type=button></calcite-action>`,n`<calcite-action .ariaLabel=${t} class=${e(a.cancelEditing)} .disabled=${l} icon=x @click=${p} .scale=${r} .text=${t} title=${t??s} type=button></calcite-action>`]||""}</div>`,h=class{constructor(i){this.options=i,this.valuePriorToEditing=""}enable(){this.valuePriorToEditing=this.options.getValue(),this.options.setInlineEditing(!0),requestAnimationFrame(()=>{this.options.setFocus()}),this.options.emitEnableEditingChange()}disable(){this.options.setInlineEditing(!1)}cancelEditing(){this.options.restoreValue(this.valuePriorToEditing),this.disable(),this.options.emitCancel(),this.options.emitEnableEditingChange()}async confirm(i,o){if(i){o?.(!0);try{await i()}finally{o?.(!1)}}this.options.commitValue(),this.disable(),this.options.emitConfirm(),this.options.emitEnableEditingChange()}},y={fromAttribute(t){return t===null?!1:t==="controls-disabled"?t:!0},toAttribute(t){return t===!1?null:t===!0?"":t}};export{a,C as b,h as c,y as d};
2
+ import{D as $,F as e,h as n,l as s}from"./RQONITLI.js";var a={container:"inline-edit--container",enableEditing:"enable-editing",confirmChanges:"confirm-changes",cancelEditing:"cancel-editing"},C=({cancelEditingLabel:t,confirmChangesLabel:i,inlineEditing:o,enableEditingLabel:c,enableEditingButtonRef:d,loading:l,onCancelEditing:p,onConfirmChanges:m,onEnableEditing:u,scale:r,showControls:g})=>n`<div class=${e(a.container)}>${!o&&n`<calcite-action .ariaLabel=${c} class=${e(a.enableEditing)} icon=pencil @click=${u} .scale=${r} .text=${c} title=${c??s} type=button ${$(d)}></calcite-action>`||""}${g&&[n`<calcite-action .ariaLabel=${i} class=${e(a.confirmChanges)} .disabled=${l} icon=check .loading=${l} @click=${m} .scale=${r} .text=${i} title=${i??s} type=button></calcite-action>`,n`<calcite-action .ariaLabel=${t} class=${e(a.cancelEditing)} .disabled=${l} icon=x @click=${p} .scale=${r} .text=${t} title=${t??s} type=button></calcite-action>`]||""}</div>`,h=class{constructor(i){this.options=i,this.valuePriorToEditing=""}enable(){this.valuePriorToEditing=this.options.getValue(),this.options.setInlineEditing(!0),requestAnimationFrame(()=>{this.options.setFocus()}),this.options.emitEnableEditingChange()}disable(){this.options.setInlineEditing(!1)}cancelEditing(){this.options.restoreValue(this.valuePriorToEditing),this.disable(),this.options.emitCancel(),this.options.emitEnableEditingChange()}async confirm(i,o){if(i){o?.(!0);try{await i()}finally{o?.(!1)}}this.options.commitValue(),this.disable(),this.options.emitConfirm(),this.options.emitEnableEditingChange()}},y={fromAttribute(t){return t===null?!1:t==="controls-disabled"?t:!0},toAttribute(t){return t===!1?null:t===!0?"":t}};export{a,C as b,h as c,y as d};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as O}from"./T6CCMW7H.js";import{a as S}from"./VI7SBYXT.js";import{E as X,F as x,H as i,R as N,g as G,h as z,i as v}from"./XXSF7VUB.js";function B(t,s,n){let r=s[0]-t[0],o=n[0]-s[0],$=s[1]-t[1],c=n[1]-s[1],h=$/Number(r||o<0&&0),a=c/Number(o||r<0&&0),e=(h*o+a*r)/(r+o);return(Math.sign(h)+Math.sign(a))*Math.min(Math.abs(h),Math.abs(a),.5*Math.abs(e))||0}function Y(t,s,n){let r=s[0]-t[0],o=s[1]-t[1];return r?(3*o/r-n)/2:n}function Z(t,s,n,r,o){let[$,c]=t,[h,a]=s,e=(h-$)/3,l=o([$+e,c+e*n]).join(","),d=o([h-e,a-e*r]).join(","),m=o([h,a]).join(",");return`C ${l} ${d} ${m}`}function H({width:t,height:s,min:n,max:r}){let o=r[0]-n[0],$=r[1]-n[1];return c=>{let h=(c[0]-n[0])/o*t,a=s-(c[1]-n[1])/$*s;return[h,a]}}function I(t){let[s,n]=t[0],r=[s,n],o=[s,n];return t.reduce(({min:$,max:c},[h,a])=>({min:[Math.min($[0],h),Math.min($[1],a)],max:[Math.max(c[0],h),Math.max(c[1],a)]}),{min:r,max:o})}function R({data:t,min:s,max:n,t:r}){if(t.length<3)return"";let[o,$]=r(t[0]),[c,h]=r(s),[a]=r(n),e,l,d,m=t.reduce((y,M,u)=>{if(l=t[u-2],d=t[u-1],u>1){let g=B(l,d,M),f=e===void 0?Y(l,d,g):e,L=Z(l,d,f,g,r);return e=g,`${y} ${L}`}return y},`M ${c},${h} L ${c},${$} L ${o},${$}`),w=t[t.length-1],k=Z(d,w,e,Y(d,w,e),r);return`${m} ${k} L ${a},${h} Z`}var E=G`:host{display:block;block-size:100%}.svg{fill:currentColor;stroke:transparent;margin:0;display:block;block-size:100%;inline-size:100%;padding:0}.svg .graph-path--highlight{fill:var(--calcite-graph-highlight-fill-color, var(--calcite-color-brand));opacity:.5}:host([hidden]){display:none}[hidden]{display:none}`,b={svg:"svg",graphPath:"graph-path",graphPathHighlight:"graph-path--highlight"},C="calcite-graph",p={host:t=>`${C}-${t}`,linearGradient:t=>`linear-gradient-${C}-${t}`,mask:(t,s)=>`${C}-${t}${s}`},P=class extends X{constructor(){super(...arguments),this.graphId=O(),this.resizeObserver=S("resize",()=>this.requestUpdate()),this.data=[]}static{this.properties={colorStops:[0,{},{attribute:!1}],data:[0,{},{attribute:!1}],highlightMax:[9,{},{type:Number}],highlightMin:[9,{},{type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}]}}static{this.styles=E}connectedCallback(){super.connectedCallback(),this.resizeObserver?.observe(this.el)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}render(){let{data:s,colorStops:n,el:r,highlightMax:o,highlightMin:$,min:c,max:h}=this,a=this.graphId,{clientHeight:e,clientWidth:l}=r;if(!s||s.length===0)return z`<svg aria-hidden=true class=${x(b.svg)} height=${e??i} preserveAspectRatio=none viewBox=${`0 0 ${l} ${e}`} width=${l??i}></svg>`;let{min:d,max:m}=I(s),w=d,k=m;(c<d[0]||c>d[0])&&(w=[c,0]),(h>m[0]||h<m[0])&&(k=[h,m[1]]);let y=H({min:w,max:k,width:l,height:e}),M=R({data:s,min:d,max:m,t:y}),u=n?`url(#${p.linearGradient(a)})`:void 0;if($!==void 0&&o!==void 0){let[g]=y([$,k[1]]),[f]=y([o,k[1]]);return z`<svg aria-hidden=true class=${x(b.svg)} height=${e??i} preserveAspectRatio=none viewBox=${`0 0 ${l} ${e}`} width=${l??i}>${v`${n?v`<defs><linearGradient id=${p.linearGradient(a)??i} x1=0 x2=1 y1=0 y2=0>${n.map(({offset:L,color:j,opacity:A})=>v`<stop offset=${`${L*100}%`} stop-color=${j??i} stop-opacity=${A??i} />`)}</linearGradient></defs>`:null}<mask height=100% id=${p.mask(a,1)??i} width=100% x=0% y=0%><path d=${`
2
+ import{a as O}from"./T6CCMW7H.js";import{a as S}from"./VI7SBYXT.js";import{E as X,F as x,H as i,R as N,g as G,h as z,i as v}from"./RQONITLI.js";function B(t,s,n){let r=s[0]-t[0],o=n[0]-s[0],$=s[1]-t[1],c=n[1]-s[1],h=$/Number(r||o<0&&0),a=c/Number(o||r<0&&0),e=(h*o+a*r)/(r+o);return(Math.sign(h)+Math.sign(a))*Math.min(Math.abs(h),Math.abs(a),.5*Math.abs(e))||0}function Y(t,s,n){let r=s[0]-t[0],o=s[1]-t[1];return r?(3*o/r-n)/2:n}function Z(t,s,n,r,o){let[$,c]=t,[h,a]=s,e=(h-$)/3,l=o([$+e,c+e*n]).join(","),d=o([h-e,a-e*r]).join(","),m=o([h,a]).join(",");return`C ${l} ${d} ${m}`}function H({width:t,height:s,min:n,max:r}){let o=r[0]-n[0],$=r[1]-n[1];return c=>{let h=(c[0]-n[0])/o*t,a=s-(c[1]-n[1])/$*s;return[h,a]}}function I(t){let[s,n]=t[0],r=[s,n],o=[s,n];return t.reduce(({min:$,max:c},[h,a])=>({min:[Math.min($[0],h),Math.min($[1],a)],max:[Math.max(c[0],h),Math.max(c[1],a)]}),{min:r,max:o})}function R({data:t,min:s,max:n,t:r}){if(t.length<3)return"";let[o,$]=r(t[0]),[c,h]=r(s),[a]=r(n),e,l,d,m=t.reduce((y,M,u)=>{if(l=t[u-2],d=t[u-1],u>1){let g=B(l,d,M),f=e===void 0?Y(l,d,g):e,L=Z(l,d,f,g,r);return e=g,`${y} ${L}`}return y},`M ${c},${h} L ${c},${$} L ${o},${$}`),w=t[t.length-1],k=Z(d,w,e,Y(d,w,e),r);return`${m} ${k} L ${a},${h} Z`}var E=G`:host{display:block;block-size:100%}.svg{fill:currentColor;stroke:transparent;margin:0;display:block;block-size:100%;inline-size:100%;padding:0}.svg .graph-path--highlight{fill:var(--calcite-graph-highlight-fill-color, var(--calcite-color-brand));opacity:.5}:host([hidden]){display:none}[hidden]{display:none}`,b={svg:"svg",graphPath:"graph-path",graphPathHighlight:"graph-path--highlight"},C="calcite-graph",p={host:t=>`${C}-${t}`,linearGradient:t=>`linear-gradient-${C}-${t}`,mask:(t,s)=>`${C}-${t}${s}`},P=class extends X{constructor(){super(...arguments),this.graphId=O(),this.resizeObserver=S("resize",()=>this.requestUpdate()),this.data=[]}static{this.properties={colorStops:[0,{},{attribute:!1}],data:[0,{},{attribute:!1}],highlightMax:[9,{},{type:Number}],highlightMin:[9,{},{type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}]}}static{this.styles=E}connectedCallback(){super.connectedCallback(),this.resizeObserver?.observe(this.el)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}render(){let{data:s,colorStops:n,el:r,highlightMax:o,highlightMin:$,min:c,max:h}=this,a=this.graphId,{clientHeight:e,clientWidth:l}=r;if(!s||s.length===0)return z`<svg aria-hidden=true class=${x(b.svg)} height=${e??i} preserveAspectRatio=none viewBox=${`0 0 ${l} ${e}`} width=${l??i}></svg>`;let{min:d,max:m}=I(s),w=d,k=m;(c<d[0]||c>d[0])&&(w=[c,0]),(h>m[0]||h<m[0])&&(k=[h,m[1]]);let y=H({min:w,max:k,width:l,height:e}),M=R({data:s,min:d,max:m,t:y}),u=n?`url(#${p.linearGradient(a)})`:void 0;if($!==void 0&&o!==void 0){let[g]=y([$,k[1]]),[f]=y([o,k[1]]);return z`<svg aria-hidden=true class=${x(b.svg)} height=${e??i} preserveAspectRatio=none viewBox=${`0 0 ${l} ${e}`} width=${l??i}>${v`${n?v`<defs><linearGradient id=${p.linearGradient(a)??i} x1=0 x2=1 y1=0 y2=0>${n.map(({offset:L,color:j,opacity:A})=>v`<stop offset=${`${L*100}%`} stop-color=${j??i} stop-opacity=${A??i} />`)}</linearGradient></defs>`:null}<mask height=100% id=${p.mask(a,1)??i} width=100% x=0% y=0%><path d=${`
3
3
  M 0,0
4
4
  L ${g-1},0
5
5
  L ${g-1},${e}
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as n}from"./24ZPXFO2.js";import{c as g}from"./XX43OXTK.js";import{D as h,h as a,l as f}from"./XXSF7VUB.js";var u={chevronsLeft:"chevrons-left",chevronsRight:"chevrons-right"};function L(e,c){return c||e.closest("calcite-shell-panel")?.position||"start"}function k({actions:e,expandables:c,expanded:o}){e.filter(t=>t.slot!==n.menuActions).forEach(t=>t.textEnabled=o),c.forEach(t=>t.expanded=o)}function B({el:e,expanded:c}){Array.from(e.querySelectorAll("calcite-action")).filter(o=>o.slot!==n.menuActions&&(o.closest("calcite-action-menu")?o.slot===g.trigger:!0)).forEach(o=>o.textEnabled=c),e.querySelectorAll("calcite-action-group, calcite-action-menu").forEach(o=>o.expanded=c)}var d=({tooltip:e,referenceElement:c,expanded:o,ref:t})=>(e&&(e.referenceElement=!o&&c?c:void 0),t&&t(c),c),P=({collapseText:e,collapseLabel:c,direction:o,expanded:t,expandText:m,expandLabel:$,toggle:v,el:S,position:A,tooltip:r,ref:E,scale:T})=>{let b=o==="rtl",l=t?e:m,p=t?c:$,i=[u.chevronsLeft,u.chevronsRight];b&&i.reverse();let s=L(S,A)==="end",x=s?i[1]:i[0],y=s?i[0]:i[1];return a`<calcite-action .aria=${{expanded:t}} .icon=${t?x:y} id=expand-toggle .label=${p} @click=${v} .scale=${T} .text=${l} .textEnabled=${t} title=${(!t&&!r?l:void 0)??f} ${h(C=>d({tooltip:r,referenceElement:C,expanded:t,ref:E}))}></calcite-action>`};export{k as a,B as b,P as c};
2
+ import{a as n}from"./24ZPXFO2.js";import{c as g}from"./XX43OXTK.js";import{D as h,h as a,l as f}from"./RQONITLI.js";var u={chevronsLeft:"chevrons-left",chevronsRight:"chevrons-right"};function L(e,c){return c||e.closest("calcite-shell-panel")?.position||"start"}function k({actions:e,expandables:c,expanded:o}){e.filter(t=>t.slot!==n.menuActions).forEach(t=>t.textEnabled=o),c.forEach(t=>t.expanded=o)}function B({el:e,expanded:c}){Array.from(e.querySelectorAll("calcite-action")).filter(o=>o.slot!==n.menuActions&&(o.closest("calcite-action-menu")?o.slot===g.trigger:!0)).forEach(o=>o.textEnabled=c),e.querySelectorAll("calcite-action-group, calcite-action-menu").forEach(o=>o.expanded=c)}var d=({tooltip:e,referenceElement:c,expanded:o,ref:t})=>(e&&(e.referenceElement=!o&&c?c:void 0),t&&t(c),c),P=({collapseText:e,collapseLabel:c,direction:o,expanded:t,expandText:m,expandLabel:$,toggle:v,el:S,position:A,tooltip:r,ref:E,scale:T})=>{let b=o==="rtl",l=t?e:m,p=t?c:$,i=[u.chevronsLeft,u.chevronsRight];b&&i.reverse();let s=L(S,A)==="end",x=s?i[1]:i[0],y=s?i[0]:i[1];return a`<calcite-action .aria=${{expanded:t}} .icon=${t?x:y} id=expand-toggle .label=${p} @click=${v} .scale=${T} .text=${l} .textEnabled=${t} title=${(!t&&!r?l:void 0)??f} ${h(C=>d({tooltip:r,referenceElement:C,expanded:t,ref:E}))}></calcite-action>`};export{k as a,B as b,P as c};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as e}from"./5DJ4CKCP.js";import{a as u}from"./DPONETMO.js";import"./JVUECPJ3.js";import{a as s}from"./FPAZVBXQ.js";import"./VUYX7MNO.js";import{a as m}from"./GBM4SNW6.js";import"./ZWPNZ5XW.js";import"./37IBLWMI.js";import"./3OUBYTMI.js";import{E as p,F as t,H as n,R as f,g as h,h as i}from"./XXSF7VUB.js";var x=h`:host{display:inline-flex}:host([scale=s]){--calcite-internal-navigation-logo-padding-inline: var(--calcite-space-md);--calcite-internal-navigation-logo-image-size: 1.75rem;--calcite-internal-navigation-logo-heading-font-size: var(--calcite-font-size-relative-base);--calcite-internal-navigation-logo-heading-standalone-font-size: var(--calcite-font-size-1);--calcite-internal-navigation-logo-description-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-navigation-logo-heading-line-height: var(--calcite-space-lg);--calcite-internal-navigation-logo-description-line-height: var(--calcite-space-lg)}:host([scale=m]){--calcite-internal-navigation-logo-padding-inline: var(--calcite-space-lg);--calcite-internal-navigation-logo-image-size: 1.75rem;--calcite-internal-navigation-logo-heading-font-size: var(--calcite-font-size-relative-md);--calcite-internal-navigation-logo-heading-standalone-font-size: var(--calcite-font-size-relative-xl);--calcite-internal-navigation-logo-description-font-size: var(--calcite-font-size-relative-base);--calcite-internal-navigation-logo-heading-line-height: var(--calcite-space-xl);--calcite-internal-navigation-logo-description-line-height: var(--calcite-space-lg)}:host([scale=l]){--calcite-internal-navigation-logo-padding-inline: var(--calcite-space-xl);--calcite-internal-navigation-logo-image-size: 2.75rem;--calcite-internal-navigation-logo-heading-font-size: var(--calcite-font-size-relative-xl);--calcite-internal-navigation-logo-heading-standalone-font-size: var(--calcite-font-size-relative-2xl);--calcite-internal-navigation-logo-description-font-size: var(--calcite-font-size-relative-lg);--calcite-internal-navigation-logo-heading-line-height: var(--calcite-space-2xl);--calcite-internal-navigation-logo-description-line-height: var(--calcite-space-2xl)}.container{margin:0;display:flex;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);background-color:var(--calcite-navigation-background-color, var(--calcite-internal-navigation-logo-background-color, var(--calcite-color-foreground-1)));border-block-end:2px solid var(--calcite-color-transparent)}.container--link{cursor:pointer;text-decoration-line:none;outline-color:transparent}:host(:focus) .container--link{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.image{block-size:var(--calcite-internal-navigation-logo-image-size)}.image,.icon{margin:0;display:flex;color:var(--calcite-navigation-logo-text-color, var(--calcite-icon-color, var(--calcite-internal-navigation-logo-text-color, var(--calcite-ui-icon-color, inherit))));padding-inline:var(--calcite-internal-navigation-logo-padding-inline)}.image~.icon{padding-inline-start:0px}.image~.text-container,.icon~.text-container{padding-inline-start:0px}:host([href]:hover),:host([href]:focus){--calcite-internal-navigation-logo-background-color: var(--calcite-color-foreground-2)}:host([href]:active){--calcite-internal-navigation-logo-background-color: var(--calcite-color-foreground-3)}:host([active]) .container{border-block-end-color:var(--calcite-navigation-accent-color, var(--calcite-color-brand))}:host([active]),:host([href]:active){--calcite-internal-navigation-logo-text-color: var(--calcite-color-brand)}.text-container{margin-block-start:.125rem;display:flex;flex-direction:column;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start;padding-inline:var(--calcite-internal-navigation-logo-padding-inline)}.heading{margin-inline-start:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-navigation-logo-heading-text-color, var(--calcite-color-text-1));font-size:var(--calcite-internal-navigation-logo-heading-font-size);padding-block-start:var(--calcite-space-2xs);line-height:var(--calcite-internal-navigation-logo-heading-line-height)}.standalone{font-size:var(--calcite-internal-navigation-logo-heading-standalone-font-size);padding-block-start:0}.description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--calcite-color-text-2);color:var(--calcite-navigation-logo-text-color, var(--calcite-color-text-2));font-size:var(--calcite-internal-navigation-logo-description-font-size);line-height:var(--calcite-internal-navigation-logo-description-line-height)}:host([hidden]){display:none}[hidden]{display:none}`,g=class extends p{constructor(){super(...arguments),this.focusSetter=m()(this),this.active=!1,this.iconFlipRtl=!1,this.scale="m"}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],description:1,heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],href:[3,{},{reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],label:1,rel:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],thumbnail:1,scale:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=x}async setFocus(a){return this.focusSetter(()=>this.href?this.el:void 0,a)}renderIcon(){return i`<calcite-icon class=${t(e.icon)} .flipRtl=${this.iconFlipRtl} .icon=${this.icon} .scale=${this.scale==="s"?"m":"l"}></calcite-icon>`}renderHeaderContent(){let{heading:a,headingLevel:o,description:l}=this,c=a?s(e.heading,u({class:{[e.heading]:!0,[e.standalone]:!this.description},level:o,children:a})):null,r=l?s(e.description,i`<span class=${t(e.description)}>${l}</span>`):null;return c||r?s(e.textContainer,i`<div class=${t(e.textContainer)}>${c}${r}</div>`):null}render(){let{icon:a,href:o,label:l,rel:c,target:r,thumbnail:d}=this,v=i`${d&&i`<img alt=${(l||"")??n} class=${t(e.image)} src=${d??n}>`||""}${a&&this.renderIcon()||""}${this.renderHeaderContent()}`;return o?i`<a class=${t({[e.container]:!0,[e.containerLink]:!0})} href=${o??n} rel=${c??n} target=${r??n}>${v}</a>`:i`<div class=${t(e.container)}>${v}</div>`}};f("calcite-navigation-logo",g);export{g as NavigationLogo};
2
+ import{a as e}from"./5DJ4CKCP.js";import{a as u}from"./NURDERM3.js";import"./DXBCV4IS.js";import{a as s}from"./XIIT6OKF.js";import"./VUYX7MNO.js";import{a as m}from"./PW7YMRBF.js";import"./ZWPNZ5XW.js";import"./I5K6EDCU.js";import"./3QPETC2U.js";import{E as p,F as t,H as n,R as f,g as h,h as i}from"./RQONITLI.js";var x=h`:host{display:inline-flex}:host([scale=s]){--calcite-internal-navigation-logo-padding-inline: var(--calcite-space-md);--calcite-internal-navigation-logo-image-size: 1.75rem;--calcite-internal-navigation-logo-heading-font-size: var(--calcite-font-size-relative-base);--calcite-internal-navigation-logo-heading-standalone-font-size: var(--calcite-font-size-1);--calcite-internal-navigation-logo-description-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-navigation-logo-heading-line-height: var(--calcite-space-lg);--calcite-internal-navigation-logo-description-line-height: var(--calcite-space-lg)}:host([scale=m]){--calcite-internal-navigation-logo-padding-inline: var(--calcite-space-lg);--calcite-internal-navigation-logo-image-size: 1.75rem;--calcite-internal-navigation-logo-heading-font-size: var(--calcite-font-size-relative-md);--calcite-internal-navigation-logo-heading-standalone-font-size: var(--calcite-font-size-relative-xl);--calcite-internal-navigation-logo-description-font-size: var(--calcite-font-size-relative-base);--calcite-internal-navigation-logo-heading-line-height: var(--calcite-space-xl);--calcite-internal-navigation-logo-description-line-height: var(--calcite-space-lg)}:host([scale=l]){--calcite-internal-navigation-logo-padding-inline: var(--calcite-space-xl);--calcite-internal-navigation-logo-image-size: 2.75rem;--calcite-internal-navigation-logo-heading-font-size: var(--calcite-font-size-relative-xl);--calcite-internal-navigation-logo-heading-standalone-font-size: var(--calcite-font-size-relative-2xl);--calcite-internal-navigation-logo-description-font-size: var(--calcite-font-size-relative-lg);--calcite-internal-navigation-logo-heading-line-height: var(--calcite-space-2xl);--calcite-internal-navigation-logo-description-line-height: var(--calcite-space-2xl)}.container{margin:0;display:flex;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);background-color:var(--calcite-navigation-background-color, var(--calcite-internal-navigation-logo-background-color, var(--calcite-color-foreground-1)));border-block-end:2px solid var(--calcite-color-transparent)}.container--link{cursor:pointer;text-decoration-line:none;outline-color:transparent}:host(:focus) .container--link{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.image{block-size:var(--calcite-internal-navigation-logo-image-size)}.image,.icon{margin:0;display:flex;color:var(--calcite-navigation-logo-text-color, var(--calcite-icon-color, var(--calcite-internal-navigation-logo-text-color, var(--calcite-ui-icon-color, inherit))));padding-inline:var(--calcite-internal-navigation-logo-padding-inline)}.image~.icon{padding-inline-start:0px}.image~.text-container,.icon~.text-container{padding-inline-start:0px}:host([href]:hover),:host([href]:focus){--calcite-internal-navigation-logo-background-color: var(--calcite-color-foreground-2)}:host([href]:active){--calcite-internal-navigation-logo-background-color: var(--calcite-color-foreground-3)}:host([active]) .container{border-block-end-color:var(--calcite-navigation-accent-color, var(--calcite-color-brand))}:host([active]),:host([href]:active){--calcite-internal-navigation-logo-text-color: var(--calcite-color-brand)}.text-container{margin-block-start:.125rem;display:flex;flex-direction:column;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start;padding-inline:var(--calcite-internal-navigation-logo-padding-inline)}.heading{margin-inline-start:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-navigation-logo-heading-text-color, var(--calcite-color-text-1));font-size:var(--calcite-internal-navigation-logo-heading-font-size);padding-block-start:var(--calcite-space-2xs);line-height:var(--calcite-internal-navigation-logo-heading-line-height)}.standalone{font-size:var(--calcite-internal-navigation-logo-heading-standalone-font-size);padding-block-start:0}.description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--calcite-color-text-2);color:var(--calcite-navigation-logo-text-color, var(--calcite-color-text-2));font-size:var(--calcite-internal-navigation-logo-description-font-size);line-height:var(--calcite-internal-navigation-logo-description-line-height)}:host([hidden]){display:none}[hidden]{display:none}`,g=class extends p{constructor(){super(...arguments),this.focusSetter=m()(this),this.active=!1,this.iconFlipRtl=!1,this.scale="m"}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],description:1,heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],href:[3,{},{reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],label:1,rel:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],thumbnail:1,scale:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=x}async setFocus(a){return this.focusSetter(()=>this.href?this.el:void 0,a)}renderIcon(){return i`<calcite-icon class=${t(e.icon)} .flipRtl=${this.iconFlipRtl} .icon=${this.icon} .scale=${this.scale==="s"?"m":"l"}></calcite-icon>`}renderHeaderContent(){let{heading:a,headingLevel:o,description:l}=this,c=a?s(e.heading,u({class:{[e.heading]:!0,[e.standalone]:!this.description},level:o,children:a})):null,r=l?s(e.description,i`<span class=${t(e.description)}>${l}</span>`):null;return c||r?s(e.textContainer,i`<div class=${t(e.textContainer)}>${c}${r}</div>`):null}render(){let{icon:a,href:o,label:l,rel:c,target:r,thumbnail:d}=this,v=i`${d&&i`<img alt=${(l||"")??n} class=${t(e.image)} src=${d??n}>`||""}${a&&this.renderIcon()||""}${this.renderHeaderContent()}`;return o?i`<a class=${t({[e.container]:!0,[e.containerLink]:!0})} href=${o??n} rel=${c??n} target=${r??n}>${v}</a>`:i`<div class=${t(e.container)}>${v}</div>`}};f("calcite-navigation-logo",g);export{g as NavigationLogo};