@esri/calcite-components 5.0.0-next.2 → 5.0.0-next.3
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.
- package/dist/calcite/{XPW6AWHY.js → 2526AKXE.js} +1 -1
- package/dist/calcite/{VC23VSV3.js → 2FBU6T3T.js} +2 -2
- package/dist/calcite/{2HCOP3OW.js → 2IUZ3YR2.js} +2 -2
- package/dist/calcite/{Y53A45DR.js → 2OBK2KGK.js} +2 -2
- package/dist/calcite/{6REOS7VN.js → 2QSQXOI5.js} +2 -2
- package/dist/calcite/{BWBMNUXP.js → 2U5DG73Y.js} +2 -2
- package/dist/calcite/{LYOVUI3B.js → 34B5K3VC.js} +2 -2
- package/dist/calcite/{XLVC3WVH.js → 35QUJIVR.js} +2 -2
- package/dist/calcite/{LQ6VE45D.js → 3DRRZPK3.js} +2 -2
- package/dist/calcite/{YA2XH3BT.js → 3GUK3G7C.js} +1 -1
- package/dist/calcite/{C23DAAYV.js → 3QKRHYDR.js} +2 -2
- package/dist/calcite/{K5VUM3MK.js → 425YTQUT.js} +2 -2
- package/dist/calcite/{QB3MUPVE.js → 43SYTK5U.js} +2 -2
- package/dist/calcite/{WEUU4GYG.js → 4AHB62J2.js} +2 -2
- package/dist/calcite/{LT7C6GNK.js → 4BE5CM4R.js} +2 -2
- package/dist/calcite/{YPW2IFI6.js → 4IBSL24S.js} +2 -2
- package/dist/calcite/{G3LW5GU5.js → 4T2MXJFD.js} +2 -2
- package/dist/calcite/{NO25YNZI.js → 52U5HSRZ.js} +2 -2
- package/dist/calcite/{HNZOEWL7.js → 57WVJI5D.js} +1 -1
- package/dist/calcite/{J5KIXHJQ.js → 5E23KXQW.js} +2 -2
- package/dist/calcite/{Z7ARDFVR.js → 5JALWDSF.js} +2 -2
- package/dist/calcite/{ZUW5HJLD.js → 5MCNWZT7.js} +2 -2
- package/dist/calcite/{KGQ7IO5B.js → 5MVGEBA4.js} +2 -2
- package/dist/calcite/{BW34ER3N.js → 6BL35Y24.js} +2 -2
- package/dist/calcite/{66UJIY7C.js → 6CFV5RKV.js} +2 -2
- package/dist/calcite/{ZQKP4DDJ.js → 6HTHE64W.js} +2 -2
- package/dist/calcite/{67W7PMC5.js → 6J3DGER2.js} +2 -2
- package/dist/calcite/{ONRCFAXM.js → 6RMUSGEC.js} +2 -2
- package/dist/calcite/{VM37RG4J.js → 6RQZN7N2.js} +2 -2
- package/dist/calcite/{SLER6GVJ.js → 6UGLHCRO.js} +2 -2
- package/dist/calcite/{QCJFC5LS.js → 777CURPL.js} +2 -2
- package/dist/calcite/{FFVF2J2J.js → 7CSKQBJD.js} +2 -2
- package/dist/calcite/{GZNEHDFX.js → 7STMP4B2.js} +1 -1
- package/dist/calcite/{AN7BJW6E.js → 7WAFUV2T.js} +2 -2
- package/dist/calcite/{LQZRO6V7.js → A7PQJDZZ.js} +2 -2
- package/dist/calcite/{ULK65WQH.js → AEYCEODJ.js} +2 -2
- package/dist/calcite/{C7SWOQAB.js → ALOAVLGK.js} +2 -2
- package/dist/calcite/{GO7QOJ4G.js → ANAWJ75J.js} +2 -2
- package/dist/calcite/{OAAKVSOG.js → AYEIZT5Y.js} +2 -2
- package/dist/calcite/{67224TPH.js → BCBU5ZR6.js} +2 -2
- package/dist/calcite/{QYME6L2Y.js → BE4UHKT6.js} +2 -2
- package/dist/calcite/{KXFX476X.js → BGDALDXM.js} +2 -2
- package/dist/calcite/{JKJRBKHB.js → BHCRRG5K.js} +2 -2
- package/dist/calcite/{RSGHKHKR.js → BSQIX4WQ.js} +2 -2
- package/dist/calcite/{2AWS3TTU.js → BVHWNNF7.js} +2 -2
- package/dist/calcite/{CAAAOTNT.js → C47YSH7C.js} +2 -2
- package/dist/calcite/{QV5VJGK4.js → CNF3Q4TX.js} +2 -2
- package/dist/calcite/{NPB7VDJV.js → CSBYILHE.js} +2 -2
- package/dist/calcite/{EFMQFOY3.js → D2QA5PI3.js} +2 -2
- package/dist/calcite/{DULSFTYX.js → DLM7KEK5.js} +2 -2
- package/dist/calcite/{OFPYAEOU.js → DNM3U3Z7.js} +1 -1
- package/dist/calcite/{ZRF2LJED.js → DQJ4CTWW.js} +2 -2
- package/dist/calcite/{7HYMMGRS.js → DY2XHFEN.js} +2 -2
- package/dist/calcite/{XWCNDKFU.js → E22QVECL.js} +2 -2
- package/dist/calcite/{ZS5AQJG2.js → E2ETQPML.js} +2 -2
- package/dist/calcite/{EZFX7GFD.js → EFEUKCWA.js} +1 -1
- package/dist/calcite/{UO6GJMZS.js → EH4IJP5H.js} +2 -2
- package/dist/calcite/{MNOO2GEE.js → EU6IVBMM.js} +2 -2
- package/dist/calcite/{DSYP2L5X.js → EWPZP6OD.js} +2 -2
- package/dist/calcite/{ZVUSRWWY.js → FJ6DIGL4.js} +2 -2
- package/dist/calcite/{V25MLN7E.js → FPD3KMKK.js} +1 -1
- package/dist/calcite/{YEEEKHTO.js → FQH6NA2N.js} +2 -2
- package/dist/calcite/{NYTC7VVQ.js → FXAVGIBO.js} +2 -2
- package/dist/calcite/{32TESKME.js → GPIMJEMU.js} +2 -2
- package/dist/calcite/{5QMODV7V.js → GT3B6N5Y.js} +1 -1
- package/dist/calcite/{PPKBJQ5Q.js → GTQBX3SK.js} +2 -2
- package/dist/calcite/{X3DBNTLH.js → HGI7ZMWJ.js} +2 -2
- package/dist/calcite/{AQJZ34DW.js → HJBVI5HP.js} +2 -2
- package/dist/calcite/{6YKZNLEV.js → HS3YVIY4.js} +2 -2
- package/dist/calcite/{S6DQTLRI.js → HXDER6NO.js} +2 -2
- package/dist/calcite/{TCRZHHM4.js → HXF4YIAH.js} +2 -2
- package/dist/calcite/{N7OPKIOO.js → HZVXI5VT.js} +2 -2
- package/dist/calcite/{ZR7MTX2F.js → I2EB746H.js} +2 -2
- package/dist/calcite/{YLT7ECGR.js → ICWMT556.js} +2 -2
- package/dist/calcite/{EF5KMWOQ.js → IVEARGFQ.js} +2 -2
- package/dist/calcite/{VC3LAQJK.js → IWU3WQTA.js} +2 -2
- package/dist/calcite/{KIBRPNHY.js → J3FSCDUX.js} +2 -2
- package/dist/calcite/{I2XGTS34.js → JDVZQ6HH.js} +2 -2
- package/dist/calcite/JEZYPF4D.js +4 -0
- package/dist/calcite/{KJXOD5Z2.js → JW4SOJWB.js} +2 -2
- package/dist/calcite/{SYNATVXJ.js → JXRRZQUL.js} +2 -2
- package/dist/calcite/{A7FBHSOE.js → K6E5LSS6.js} +2 -2
- package/dist/calcite/{AZVSLWKE.js → K6F4PVVD.js} +2 -2
- package/dist/calcite/{KTT2ROP5.js → KEKHXXG2.js} +2 -2
- package/dist/calcite/{3PF6L44U.js → KGALTIIM.js} +2 -2
- package/dist/calcite/{7MNPDRSG.js → KIGAOJGV.js} +1 -1
- package/dist/calcite/{43WQ54NQ.js → KMS2JCWI.js} +1 -1
- package/dist/calcite/{5DRLQB2T.js → KNTW4634.js} +1 -1
- package/dist/calcite/{4AL3SLA3.js → KUUFM5EV.js} +2 -2
- package/dist/calcite/{CP6672N4.js → KXG3JNXH.js} +2 -2
- package/dist/calcite/{JX2SCNZH.js → KZSABN6Z.js} +2 -2
- package/dist/calcite/{6G4YIOVX.js → L6HFE67F.js} +1 -1
- package/dist/calcite/{VOP2KDER.js → LSTKQGBO.js} +2 -2
- package/dist/calcite/{RKHTX2IT.js → LT2NMLTM.js} +2 -2
- package/dist/calcite/{57G6CI2K.js → MBIDNSLG.js} +1 -1
- package/dist/calcite/{34C2CSRC.js → MEERCHNE.js} +2 -2
- package/dist/calcite/{TZGCNMHE.js → MIR3A75I.js} +2 -2
- package/dist/calcite/{SKEE2RVS.js → N4VKIVPS.js} +2 -2
- package/dist/calcite/{52HAQJHJ.js → N5LX4COS.js} +2 -2
- package/dist/calcite/{AND4R747.js → NHJ736R2.js} +2 -2
- package/dist/calcite/{5Z6FCIBA.js → NHUHCQ4J.js} +1 -1
- package/dist/calcite/{6VQKSVQZ.js → NL3LLRLQ.js} +2 -2
- package/dist/calcite/{YTKNZCQJ.js → OBEAWB6Y.js} +2 -2
- package/dist/calcite/{IGR4KAKH.js → OPTERABQ.js} +2 -2
- package/dist/calcite/{Z5QL3IGF.js → OT4HMOKY.js} +2 -2
- package/dist/calcite/{APWPUFHK.js → OWE3TUYA.js} +2 -2
- package/dist/calcite/{732CITAT.js → P2MLMFIB.js} +2 -2
- package/dist/calcite/{UBGSVRI6.js → P2RYGBBZ.js} +2 -2
- package/dist/calcite/{FDJBCYHX.js → P5PS2PVQ.js} +2 -2
- package/dist/calcite/{QYN4Y2UO.js → PAKKXMW6.js} +1 -1
- package/dist/calcite/{7NSIROF7.js → PBJYTCZQ.js} +1 -1
- package/dist/calcite/{A7LIGMJQ.js → PDC2HFCE.js} +1 -1
- package/dist/calcite/{Z6R3XFLS.js → PHQB3YSI.js} +2 -2
- package/dist/calcite/{G3NSWBMZ.js → PO2U44AW.js} +2 -2
- package/dist/calcite/{GRMS7FQY.js → PSYXUHRF.js} +1 -1
- package/dist/calcite/{6MJOAFKY.js → PX5VW7CA.js} +2 -2
- package/dist/calcite/{YWWOX5W3.js → QDR7A47F.js} +2 -2
- package/dist/calcite/{KQAALLEV.js → QP5GAAB3.js} +2 -2
- package/dist/calcite/{MFSHN3IL.js → QSCN7J3O.js} +2 -2
- package/dist/calcite/{EJNDGPN2.js → QTBEVUXO.js} +2 -2
- package/dist/calcite/{GQIOILN4.js → QX6ZGXUA.js} +2 -2
- package/dist/calcite/{5ZVESTKT.js → R7GSVJN5.js} +2 -2
- package/dist/calcite/{2NLH7XFG.js → RQFHIC47.js} +2 -2
- package/dist/calcite/{O6YPQQ5N.js → RQU4NRTA.js} +2 -2
- package/dist/calcite/{5HYWAM3T.js → RSQ6RL3K.js} +1 -1
- package/dist/calcite/{RJQBTNQM.js → RWVRFF3I.js} +2 -2
- package/dist/calcite/{PV4KB5V4.js → S5R35RX3.js} +2 -2
- package/dist/calcite/{3IXSIT7M.js → S5TFXGHY.js} +2 -2
- package/dist/calcite/{2QAR72YP.js → SKKSLFHT.js} +2 -2
- package/dist/calcite/{S4PILGWU.js → SLICSH62.js} +2 -2
- package/dist/calcite/{UQCEQ44M.js → SN7NAXJ7.js} +2 -2
- package/dist/calcite/{26A44OD3.js → TG4OK7FQ.js} +2 -2
- package/dist/calcite/{R5RXEIYL.js → TKNM6PGC.js} +2 -2
- package/dist/calcite/{7ZV336XQ.js → U235MJ2F.js} +2 -2
- package/dist/calcite/{IEON5PAG.js → UA4KBTNZ.js} +2 -2
- package/dist/calcite/{FMHT4PTX.js → UCRIU7RD.js} +2 -2
- package/dist/calcite/{M3SKP2LL.js → UTGJTZUE.js} +2 -2
- package/dist/calcite/{GBKXT23N.js → UXWFYSWM.js} +2 -2
- package/dist/calcite/{66PQSM5C.js → VAG4CLRN.js} +2 -2
- package/dist/calcite/{7C5HX3U5.js → VBT5FAGS.js} +1 -1
- package/dist/calcite/{AUWGPSX4.js → VFZYB7KV.js} +2 -2
- package/dist/calcite/{DX5CTXCH.js → VGOGYBOG.js} +2 -2
- package/dist/calcite/{L63F4E2F.js → VQT3LLC7.js} +1 -1
- package/dist/calcite/{EU53PNIW.js → WIJWBGXQ.js} +2 -2
- package/dist/calcite/{FHD6A3EJ.js → WJT34A4V.js} +2 -2
- package/dist/calcite/{MRLX7ZWB.js → WLATCKTT.js} +2 -2
- package/dist/calcite/{H6ACIWPU.js → WRHL43TZ.js} +2 -2
- package/dist/calcite/{2ZC3AAAG.js → WRVSFB7L.js} +2 -2
- package/dist/calcite/{5NYJ6WZZ.js → WTV3W5WN.js} +2 -2
- package/dist/calcite/{YGIF2DGN.js → WVP5XPLP.js} +2 -2
- package/dist/calcite/{UKTG6YHR.js → WWH2YWKG.js} +2 -2
- package/dist/calcite/{BTKNJZBD.js → WWKRJ5BW.js} +2 -2
- package/dist/calcite/{JYXQNDBZ.js → WWUSLEON.js} +2 -2
- package/dist/calcite/{3625VFO5.js → X3IVLT67.js} +2 -2
- package/dist/calcite/{K6SZIYUC.js → XAUVURWR.js} +1 -1
- package/dist/calcite/{GI7F3WH2.js → XO5ETFTI.js} +1 -1
- package/dist/calcite/{B3CZZZ3T.js → XRAT3TME.js} +2 -2
- package/dist/calcite/{FEP2O2MA.js → XWOGKL32.js} +2 -2
- package/dist/calcite/{UMUEMXJF.js → XWXCOJUO.js} +2 -2
- package/dist/calcite/{SQE7VYLC.js → XXNZUORE.js} +2 -2
- package/dist/calcite/{WFBFQEOK.js → XXYGNCPD.js} +2 -2
- package/dist/calcite/{Y5N22JX4.js → XYJQXYRM.js} +2 -2
- package/dist/calcite/{M7JX436Q.js → YANBAVXH.js} +2 -2
- package/dist/calcite/{GPIRDMOU.js → YG7PWF3G.js} +2 -2
- package/dist/calcite/{HG4ISKH4.js → YPBCS4NA.js} +2 -2
- package/dist/calcite/{UMPKFWZZ.js → YT4SL4T4.js} +2 -2
- package/dist/calcite/{TDYNRNC3.js → YTEVYZWQ.js} +2 -2
- package/dist/calcite/{QUSE2BTR.js → ZCDYIKPL.js} +2 -2
- package/dist/calcite/{BXLQRGO6.js → ZLSS7CXL.js} +2 -2
- package/dist/calcite/{N3EON3SQ.js → ZMYI2UVC.js} +2 -2
- package/dist/calcite/{MVRE5C3I.js → ZN5NGGVV.js} +2 -2
- package/dist/calcite/{2XQID652.js → ZTZGAKAG.js} +2 -2
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/chunks/runtime.js +4 -4
- package/dist/components/calcite-action/customElement.d.ts +1 -1
- package/dist/components/calcite-action-pad/customElement.d.ts +1 -1
- package/dist/components/calcite-block/customElement.d.ts +4 -4
- package/dist/components/calcite-block-group/customElement.d.ts +1 -1
- package/dist/components/calcite-block-section/customElement.d.ts +2 -2
- package/dist/components/calcite-card/customElement.d.ts +1 -1
- package/dist/components/calcite-card/customElement.js +1 -1
- package/dist/components/calcite-combobox-item/customElement.d.ts +1 -1
- package/dist/components/calcite-dialog/customElement.d.ts +1 -1
- package/dist/components/calcite-dropdown/customElement.d.ts +1 -1
- package/dist/components/calcite-input-number/customElement.d.ts +2 -2
- package/dist/components/calcite-list/customElement.d.ts +1 -1
- package/dist/components/calcite-list-item/customElement.d.ts +1 -1
- package/dist/components/calcite-sheet/customElement.d.ts +2 -2
- package/dist/components/calcite-shell-panel/customElement.d.ts +4 -4
- package/dist/components/calcite-stepper/customElement.d.ts +1 -1
- package/dist/components/calcite-tile/customElement.d.ts +2 -2
- package/dist/components/calcite-tooltip/customElement.d.ts +1 -1
- package/dist/docs/api.json +50 -50
- package/dist/docs/docs.json +28 -28
- package/dist/docs/vscode.html-custom-data.json +23 -23
- package/dist/docs/web-types.json +24 -24
- package/package.json +3 -3
- package/dist/calcite/U2QCHDBN.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as S}from"./34C2CSRC.js";import{c as h,e as C,f as L,g as O,h as R,i as p}from"./QV5VJGK4.js";import{a as H}from"./26A44OD3.js";import"./AN7BJW6E.js";import"./V25MLN7E.js";import{h as k,j as y}from"./S4PILGWU.js";import{a as b}from"./OFPYAEOU.js";import{B as c,C as d,D as T,E as l,H as w,P as E,g as v,h as g,o as r}from"./C7SWOQAB.js";var P={positionContainer:"position-container",container:"container"},U="calcite-tooltip",z={host:n=>`${U}-${n}`},m=300,F=m/3,N=m*1.5,x="aria-describedby";function I(n){let{referenceElement:e}=n;return(typeof e=="string"?y(n,{id:e}):e)||null}var f=class{constructor(){this.registeredElements=new WeakMap,this.registeredShadowRootCounts=new WeakMap,this.hoverOpenTimeout=null,this.hoverCloseTimeout=null,this.activeTooltip=null,this.registeredElementCount=0,this.clickedTooltip=null,this.hoveredTooltip=null,this.queryTooltip=e=>{let{registeredElements:t}=this,i=e.find(o=>t.has(o));return t.get(i)},this.keyDownHandler=e=>{if(e.key==="Escape"&&!e.defaultPrevented){let{activeTooltip:t}=this;if(t?.open){this.clearHoverTimeout(),this.closeActiveTooltip();let i=I(t),o=e.composedPath();(i instanceof Element&&o.includes(i)||o.includes(t))&&e.preventDefault()}}},this.pointerLeaveHandler=e=>{e.defaultPrevented||(this.clearHoverTimeout(),this.closeHoveredTooltip())},this.pointerMoveHandler=e=>{if(e.defaultPrevented){this.closeHoveredTooltip();return}let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(i!==this.hoveredTooltip&&this.clearHoverOpenTimeout(),this.hoveredTooltip=i,i?this.openHoveredTooltip(i):this.activeTooltip?.open&&this.closeHoveredTooltip(),this.clickedTooltip=null)},this.clickHandler=e=>{if(e.defaultPrevented)return;this.clickedTooltip=null;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}if(this.closeActiveTooltip(),!!i){if(this.clearHoverTimeout(),i.closeOnClick){this.clickedTooltip=i,this.toggleTooltip(i,!1);return}this.toggleTooltip(i,!0)}},this.blurHandler=()=>{this.closeActiveTooltip()},this.focusInHandler=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(this.clickedTooltip=null,this.closeTooltipIfNotActive(i),i&&this.toggleFocusedTooltip(i,!0))},this.openHoveredTooltip=e=>{this.hoverOpenTimeout=window.setTimeout(()=>{this.hoverOpenTimeout===null||e!==this.hoveredTooltip||(this.clearHoverCloseTimeout(),this.closeTooltipIfNotActive(e),this.toggleTooltip(e,!0))},this.activeTooltip?.open?F:m)},this.closeHoveredTooltip=()=>{this.hoverCloseTimeout=window.setTimeout(()=>{this.hoverCloseTimeout!==null&&this.closeActiveTooltip()},N)}}registerElement(e,t){this.registeredElementCount++,this.registeredElements.set(e,t);let i=this.getReferenceElShadowRootNode(e);i&&this.registerShadowRoot(i),this.registeredElementCount===1&&this.addListeners()}unregisterElement(e){let t=this.getReferenceElShadowRootNode(e);t&&this.unregisterShadowRoot(t),this.registeredElements.delete(e)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}pathHasOpenTooltip(e,t){let{activeTooltip:i}=this;return i?.open&&t.includes(i)||e?.open&&t.includes(e)}addShadowListeners(e){e.addEventListener("focusin",this.focusInHandler)}removeShadowListeners(e){e.removeEventListener("focusin",this.focusInHandler)}addListeners(){window.addEventListener("keydown",this.keyDownHandler),window.addEventListener("pointermove",this.pointerMoveHandler),window.addEventListener("click",this.clickHandler),window.addEventListener("focusin",this.focusInHandler),window.addEventListener("blur",this.blurHandler),document.addEventListener("pointerleave",this.pointerLeaveHandler)}removeListeners(){window.removeEventListener("keydown",this.keyDownHandler),window.removeEventListener("pointermove",this.pointerMoveHandler),window.removeEventListener("click",this.clickHandler),window.removeEventListener("focusin",this.focusInHandler),window.removeEventListener("blur",this.blurHandler),document.removeEventListener("pointerleave",this.pointerLeaveHandler)}clearHoverOpenTimeout(){window.clearTimeout(this.hoverOpenTimeout),this.hoverOpenTimeout=null}clearHoverCloseTimeout(){window.clearTimeout(this.hoverCloseTimeout),this.hoverCloseTimeout=null}clearHoverTimeout(){this.clearHoverOpenTimeout(),this.clearHoverCloseTimeout()}closeTooltipIfNotActive(e){this.activeTooltip!==e&&this.closeActiveTooltip()}closeActiveTooltip(){let{activeTooltip:e}=this;e?.open&&this.toggleTooltip(e,!1)}toggleFocusedTooltip(e,t){t&&this.clearHoverTimeout(),this.toggleTooltip(e,t)}toggleTooltip(e,t){e.open=t,this.activeTooltip=t?e:null}registerShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.min((typeof i=="number"?i:0)+1,1);o===1&&this.addShadowListeners(e),t.set(e,o)}unregisterShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.max((typeof i=="number"?i:1)-1,0);o===0&&this.removeShadowListeners(e),t.set(e,o)}getReferenceElShadowRootNode(e){return e instanceof Element?k(e):null}},B=v`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:contents}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .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}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}.container{position:relative;overflow:hidden;padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`,A=new f,u=class extends T{constructor(){super(...arguments),this.arrowRef=c(),this.guid=z.host(b()),this.transitionProp="opacity",this.transitionRef=c(),this.floatingLayout="vertical",this.closeOnClick=!1,this.offsetDistance=p,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.calciteTooltipBeforeClose=r({cancelable:!1}),this.calciteTooltipBeforeOpen=r({cancelable:!1}),this.calciteTooltipClose=r({cancelable:!1}),this.calciteTooltipOpen=r({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnClick:[7,{},{reflect:!0,type:Boolean}],label:1,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}}static{this.styles=B}async reposition(e=!1){let{referenceEl:t,placement:i,overlayPositioning:o,offsetDistance:s,offsetSkidding:a,arrowRef:D,floatingEl:_}=this;return C(this,{floatingEl:_,referenceEl:t,overlayPositioning:o,placement:i,offsetDistance:s,offsetSkidding:a,arrowEl:D.value,type:"tooltip"},e)}connectedCallback(){super.connectedCallback(),this.setUpReferenceElement(!0)}willUpdate(e){(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==p)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!=="auto"))&&this.reposition(!0),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("referenceElement")&&this.setUpReferenceElement()}loaded(){this.referenceElement&&!this.referenceEl&&this.setUpReferenceElement()}disconnectedCallback(){super.disconnectedCallback(),this.removeReferences(),R(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open&&this.referenceEl?this.floatingEl.showPopover():this.floatingEl.hidePopover())}openHandler(){H(this),this.reposition(!0),this.handlePopover()}onBeforeOpen(){this.calciteTooltipBeforeOpen.emit()}onOpen(){this.calciteTooltipOpen.emit()}onBeforeClose(){this.calciteTooltipBeforeClose.emit()}onClose(){this.calciteTooltipClose.emit(),L(this)}setFloatingEl(e){this.floatingEl=e,e&&requestAnimationFrame(()=>this.setUpReferenceElement())}setUpReferenceElement(e=!0){this.removeReferences(),this.referenceEl=I(this.el),O(this);let{el:t,referenceElement:i,referenceEl:o}=this;e&&i&&!o&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences(),this.handlePopover()}getId(){return this.el.id||this.guid}addReferences(){let{referenceEl:e}=this;if(!e)return;let t=this.getId();"setAttribute"in e&&e.setAttribute(x,t),A.registerElement(e,this.el)}removeReferences(){let{referenceEl:e}=this;e&&("removeAttribute"in e&&e.removeAttribute(x),A.unregisterElement(e))}render(){let{referenceEl:e,label:t,open:i,floatingLayout:o}=this,s=e&&i,a=!s;return this.el.inert=a,this.el.ariaLabel=t,this.el.ariaLive="polite",w(this.el,"id",this.getId()),this.el.role="tooltip",g`<div class=${l(P.positionContainer)} popover=manual ${d(this.setFloatingEl)}><div class=${l({[h.animation]:!0,[h.animationActive]:s})} ${d(this.transitionRef)}>${S({floatingLayout:o,ref:this.arrowRef})}<div class=${l(P.container)}><slot></slot></div></div></div>`}};E("calcite-tooltip",u);export{u as Tooltip};
|
|
3
|
+
v5.0.0-next.3 */
|
|
4
|
+
import{a as S}from"./MEERCHNE.js";import{c as h,e as C,f as L,g as O,h as R,i as p}from"./CNF3Q4TX.js";import{a as H}from"./TG4OK7FQ.js";import"./7WAFUV2T.js";import"./FPD3KMKK.js";import{h as k,j as y}from"./SLICSH62.js";import{a as b}from"./DNM3U3Z7.js";import{B as c,C as d,D as T,E as l,H as w,P as E,g as v,h as g,o as r}from"./ALOAVLGK.js";var P={positionContainer:"position-container",container:"container"},U="calcite-tooltip",z={host:n=>`${U}-${n}`},m=300,F=m/3,N=m*1.5,x="aria-describedby";function I(n){let{referenceElement:e}=n;return(typeof e=="string"?y(n,{id:e}):e)||null}var f=class{constructor(){this.registeredElements=new WeakMap,this.registeredShadowRootCounts=new WeakMap,this.hoverOpenTimeout=null,this.hoverCloseTimeout=null,this.activeTooltip=null,this.registeredElementCount=0,this.clickedTooltip=null,this.hoveredTooltip=null,this.queryTooltip=e=>{let{registeredElements:t}=this,i=e.find(o=>t.has(o));return t.get(i)},this.keyDownHandler=e=>{if(e.key==="Escape"&&!e.defaultPrevented){let{activeTooltip:t}=this;if(t?.open){this.clearHoverTimeout(),this.closeActiveTooltip();let i=I(t),o=e.composedPath();(i instanceof Element&&o.includes(i)||o.includes(t))&&e.preventDefault()}}},this.pointerLeaveHandler=e=>{e.defaultPrevented||(this.clearHoverTimeout(),this.closeHoveredTooltip())},this.pointerMoveHandler=e=>{if(e.defaultPrevented){this.closeHoveredTooltip();return}let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(i!==this.hoveredTooltip&&this.clearHoverOpenTimeout(),this.hoveredTooltip=i,i?this.openHoveredTooltip(i):this.activeTooltip?.open&&this.closeHoveredTooltip(),this.clickedTooltip=null)},this.clickHandler=e=>{if(e.defaultPrevented)return;this.clickedTooltip=null;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}if(this.closeActiveTooltip(),!!i){if(this.clearHoverTimeout(),i.closeOnClick){this.clickedTooltip=i,this.toggleTooltip(i,!1);return}this.toggleTooltip(i,!0)}},this.blurHandler=()=>{this.closeActiveTooltip()},this.focusInHandler=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(this.clickedTooltip=null,this.closeTooltipIfNotActive(i),i&&this.toggleFocusedTooltip(i,!0))},this.openHoveredTooltip=e=>{this.hoverOpenTimeout=window.setTimeout(()=>{this.hoverOpenTimeout===null||e!==this.hoveredTooltip||(this.clearHoverCloseTimeout(),this.closeTooltipIfNotActive(e),this.toggleTooltip(e,!0))},this.activeTooltip?.open?F:m)},this.closeHoveredTooltip=()=>{this.hoverCloseTimeout=window.setTimeout(()=>{this.hoverCloseTimeout!==null&&this.closeActiveTooltip()},N)}}registerElement(e,t){this.registeredElementCount++,this.registeredElements.set(e,t);let i=this.getReferenceElShadowRootNode(e);i&&this.registerShadowRoot(i),this.registeredElementCount===1&&this.addListeners()}unregisterElement(e){let t=this.getReferenceElShadowRootNode(e);t&&this.unregisterShadowRoot(t),this.registeredElements.delete(e)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}pathHasOpenTooltip(e,t){let{activeTooltip:i}=this;return i?.open&&t.includes(i)||e?.open&&t.includes(e)}addShadowListeners(e){e.addEventListener("focusin",this.focusInHandler)}removeShadowListeners(e){e.removeEventListener("focusin",this.focusInHandler)}addListeners(){window.addEventListener("keydown",this.keyDownHandler),window.addEventListener("pointermove",this.pointerMoveHandler),window.addEventListener("click",this.clickHandler),window.addEventListener("focusin",this.focusInHandler),window.addEventListener("blur",this.blurHandler),document.addEventListener("pointerleave",this.pointerLeaveHandler)}removeListeners(){window.removeEventListener("keydown",this.keyDownHandler),window.removeEventListener("pointermove",this.pointerMoveHandler),window.removeEventListener("click",this.clickHandler),window.removeEventListener("focusin",this.focusInHandler),window.removeEventListener("blur",this.blurHandler),document.removeEventListener("pointerleave",this.pointerLeaveHandler)}clearHoverOpenTimeout(){window.clearTimeout(this.hoverOpenTimeout),this.hoverOpenTimeout=null}clearHoverCloseTimeout(){window.clearTimeout(this.hoverCloseTimeout),this.hoverCloseTimeout=null}clearHoverTimeout(){this.clearHoverOpenTimeout(),this.clearHoverCloseTimeout()}closeTooltipIfNotActive(e){this.activeTooltip!==e&&this.closeActiveTooltip()}closeActiveTooltip(){let{activeTooltip:e}=this;e?.open&&this.toggleTooltip(e,!1)}toggleFocusedTooltip(e,t){t&&this.clearHoverTimeout(),this.toggleTooltip(e,t)}toggleTooltip(e,t){e.open=t,this.activeTooltip=t?e:null}registerShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.min((typeof i=="number"?i:0)+1,1);o===1&&this.addShadowListeners(e),t.set(e,o)}unregisterShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.max((typeof i=="number"?i:1)-1,0);o===0&&this.removeShadowListeners(e),t.set(e,o)}getReferenceElShadowRootNode(e){return e instanceof Element?k(e):null}},B=v`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:contents}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .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}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}.container{position:relative;overflow:hidden;padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`,A=new f,u=class extends T{constructor(){super(...arguments),this.arrowRef=c(),this.guid=z.host(b()),this.transitionProp="opacity",this.transitionRef=c(),this.floatingLayout="vertical",this.closeOnClick=!1,this.offsetDistance=p,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.calciteTooltipBeforeClose=r({cancelable:!1}),this.calciteTooltipBeforeOpen=r({cancelable:!1}),this.calciteTooltipClose=r({cancelable:!1}),this.calciteTooltipOpen=r({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnClick:[7,{},{reflect:!0,type:Boolean}],label:1,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}}static{this.styles=B}async reposition(e=!1){let{referenceEl:t,placement:i,overlayPositioning:o,offsetDistance:s,offsetSkidding:a,arrowRef:D,floatingEl:_}=this;return C(this,{floatingEl:_,referenceEl:t,overlayPositioning:o,placement:i,offsetDistance:s,offsetSkidding:a,arrowEl:D.value,type:"tooltip"},e)}connectedCallback(){super.connectedCallback(),this.setUpReferenceElement(!0)}willUpdate(e){(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==p)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!=="auto"))&&this.reposition(!0),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("referenceElement")&&this.setUpReferenceElement()}loaded(){this.referenceElement&&!this.referenceEl&&this.setUpReferenceElement()}disconnectedCallback(){super.disconnectedCallback(),this.removeReferences(),R(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open&&this.referenceEl?this.floatingEl.showPopover():this.floatingEl.hidePopover())}openHandler(){H(this),this.reposition(!0),this.handlePopover()}onBeforeOpen(){this.calciteTooltipBeforeOpen.emit()}onOpen(){this.calciteTooltipOpen.emit()}onBeforeClose(){this.calciteTooltipBeforeClose.emit()}onClose(){this.calciteTooltipClose.emit(),L(this)}setFloatingEl(e){this.floatingEl=e,e&&requestAnimationFrame(()=>this.setUpReferenceElement())}setUpReferenceElement(e=!0){this.removeReferences(),this.referenceEl=I(this.el),O(this);let{el:t,referenceElement:i,referenceEl:o}=this;e&&i&&!o&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences(),this.handlePopover()}getId(){return this.el.id||this.guid}addReferences(){let{referenceEl:e}=this;if(!e)return;let t=this.getId();"setAttribute"in e&&e.setAttribute(x,t),A.registerElement(e,this.el)}removeReferences(){let{referenceEl:e}=this;e&&("removeAttribute"in e&&e.removeAttribute(x),A.unregisterElement(e))}render(){let{referenceEl:e,label:t,open:i,floatingLayout:o}=this,s=e&&i,a=!s;return this.el.inert=a,this.el.ariaLabel=t,this.el.ariaLive="polite",w(this.el,"id",this.getId()),this.el.role="tooltip",g`<div class=${l(P.positionContainer)} popover=manual ${d(this.setFloatingEl)}><div class=${l({[h.animation]:!0,[h.animationActive]:s})} ${d(this.transitionRef)}>${S({floatingLayout:o,ref:this.arrowRef})}<div class=${l(P.container)}><slot></slot></div></div></div>`}};E("calcite-tooltip",u);export{u as Tooltip};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as i,b as t,c as e,d as n}from"./
|
|
3
|
+
v5.0.0-next.3 */
|
|
4
|
+
import{a as i,b as t,c as e,d as n}from"./3GUK3G7C.js";var r={width:{medium:a(n.max),small:a(e.max),xsmall:a(t.max),xxsmall:a(i.max)}};function a(s){return parseInt(s)}export{r as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.3 */
|
|
4
4
|
var i="CALCITE-COMBOBOX-ITEM",l="CALCITE-COMBOBOX-ITEM-GROUP",t=`${i}, ${l}`,o={allSelected:"all-selected",chip:"chip",chipInvisible:"chip--invisible",icon:"icon",input:"input",inputHidden:"input--hidden",label:"label",labelIcon:"label--icon",listContainer:"list-container",noMatches:"no-matches",noMatchesPlaceholder:"no-matches-placeholder",placeholderIcon:"placeholder-icon",selectAll:"select-all",selectionDisplayFit:"selection-display--fit",selectionDisplaySingle:"selection-display--single",selectedIcon:"selected-icon",floatingUIContainer:"floating-ui-container",screenReadersOnly:"screen-readers-only",wrapper:"wrapper",wrapperSingle:"wrapper--single",wrapperActive:"wrapper--active",gridInput:"grid-input",inputSingle:"input--single",inputIcon:"input--icon",inputWrap:"input-wrap",inputWrapSingle:"input-wrap--single",iconEnd:"icon-end",iconStart:"icon-start",list:"list",listHide:"list--hide"},n="combobox",c={validationMessage:"comboboxValidationMessage",item:e=>`${n}-item-${e}`,chip:e=>`${n}-chip-${e}`,label:e=>`${n}-label-${e}`,listbox:e=>`${n}-listbox-${e}`,input:e=>`${n}-input-${e}`},a={chevronUp:"chevron-up",chevronDown:"chevron-down"},s={labelContent:"label-content"};export{i as a,l as b,t as c,o as d,c as e,a as f,s as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{l as r,t as s,u as i,x as o}from"./
|
|
3
|
+
v5.0.0-next.3 */
|
|
4
|
+
import{l as r,t as s,u as i,x as o}from"./ALOAVLGK.js";var u=s(class extends i{constructor(){super(...arguments),this.key=r}render(t,e){return this.key=t,e}update(t,[e,m]){return e!==this.key&&(o(t),this.key=e),m}});export{u as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{h as O,k as L}from"./ZR7MTX2F.js";import{c as M,e as F,f as E}from"./RJQBTNQM.js";import{a as v}from"./AN7BJW6E.js";import"./6G4YIOVX.js";import{a as T}from"./5HYWAM3T.js";import{a as S}from"./EU53PNIW.js";import"./GBKXT23N.js";import{p as V}from"./S4PILGWU.js";import"./OFPYAEOU.js";import{B as d,C as m,D as k,E as b,F as p,P as C,g as z,h}from"./C7SWOQAB.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"},U=z`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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-3));--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))}: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)}: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;font-size:var(--calcite-internal-meter-font-size)}.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=d(),this.labelFlipMax=.8,this.labelFlipProximity=.15,this.lowLabelRef=d(),this.maxLabelRef=d(),this.maxPercent=100,this.messages=S({name:null}),this.meterContainerRef=d(),this.minLabelRef=d(),this.minPercent=0,this.resizeObserver=T("resize",()=>this.resizeHandler()),this.valueLabelRef=d(),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=U}connectedCallback(){super.connectedCallback(),M(this),this.resizeObserver?.observe(this.el)}load(){this.calculateValues(),E(this,this.value)}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(),F(this),this.resizeObserver?.disconnect()}handleRangeChange(){this.calculateValues(),this.updateLabels()}resizeHandler(){this.updateLabels()}updateLabels(){this.valueLabelRef.value&&this.determineValueLabelPosition(),this.rangeLabels&&this.determineVisibleLabels()}calculateValues(){let{min:e,max:l,low:t,high:a,value:i}=this,n=100*(t-e)/(l-e),s=100*(a-e)/(l-e),c=100*(i-e)/(l-e);(!t||t<e||t>a||t>l)&&(this.low=e),(!a||a>l||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=O(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>=n,u=i<n,f=i>=s,o=i<s;return!i||!e&&o||u?r.success:c&&o?r.warning:f?r.danger:r.success}intersects(e,l){return e&&l&&V(e.getBoundingClientRect(),l.getBoundingClientRect())}determineVisibleLabels(){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),u=this.intersects(e,l),f=this.intersects(e,a),o=r.labelHidden;l&&(u||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,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}%`},u=(a-t)/100<i?c:s;return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(u)} ${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:u,min:f,minPercent:o,rangeLabels:g,rangeLabelType:x,unitLabel:$,value:w,valueLabel:P,valueLabelType:R}=this,H=this.formatLabel(l/100,"percent"),I=`${w} ${$}`;return h`<div .ariaLabel=${i} .ariaValueMax=${x==="percent"?u:c} .ariaValueMin=${x==="percent"?o:f} .ariaValueNow=${R==="percent"?l:w} .ariaValueText=${R==="percent"?H:$?I: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};
|
|
3
|
+
v5.0.0-next.3 */
|
|
4
|
+
import{h as O,k as L}from"./I2EB746H.js";import{c as M,e as F,f as E}from"./RWVRFF3I.js";import{a as v}from"./7WAFUV2T.js";import"./L6HFE67F.js";import{a as T}from"./RSQ6RL3K.js";import{a as S}from"./WIJWBGXQ.js";import"./UXWFYSWM.js";import{p as V}from"./SLICSH62.js";import"./DNM3U3Z7.js";import{B as d,C as m,D as k,E as b,F as p,P as C,g as z,h}from"./ALOAVLGK.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"},U=z`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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-3));--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))}: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)}: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;font-size:var(--calcite-internal-meter-font-size)}.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=d(),this.labelFlipMax=.8,this.labelFlipProximity=.15,this.lowLabelRef=d(),this.maxLabelRef=d(),this.maxPercent=100,this.messages=S({name:null}),this.meterContainerRef=d(),this.minLabelRef=d(),this.minPercent=0,this.resizeObserver=T("resize",()=>this.resizeHandler()),this.valueLabelRef=d(),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=U}connectedCallback(){super.connectedCallback(),M(this),this.resizeObserver?.observe(this.el)}load(){this.calculateValues(),E(this,this.value)}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(),F(this),this.resizeObserver?.disconnect()}handleRangeChange(){this.calculateValues(),this.updateLabels()}resizeHandler(){this.updateLabels()}updateLabels(){this.valueLabelRef.value&&this.determineValueLabelPosition(),this.rangeLabels&&this.determineVisibleLabels()}calculateValues(){let{min:e,max:l,low:t,high:a,value:i}=this,n=100*(t-e)/(l-e),s=100*(a-e)/(l-e),c=100*(i-e)/(l-e);(!t||t<e||t>a||t>l)&&(this.low=e),(!a||a>l||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=O(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>=n,u=i<n,f=i>=s,o=i<s;return!i||!e&&o||u?r.success:c&&o?r.warning:f?r.danger:r.success}intersects(e,l){return e&&l&&V(e.getBoundingClientRect(),l.getBoundingClientRect())}determineVisibleLabels(){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),u=this.intersects(e,l),f=this.intersects(e,a),o=r.labelHidden;l&&(u||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,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}%`},u=(a-t)/100<i?c:s;return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(u)} ${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:u,min:f,minPercent:o,rangeLabels:g,rangeLabelType:x,unitLabel:$,value:w,valueLabel:P,valueLabelType:R}=this,H=this.formatLabel(l/100,"percent"),I=`${w} ${$}`;return h`<div .ariaLabel=${i} .ariaValueMax=${x==="percent"?u:c} .ariaValueMin=${x==="percent"?o:f} .ariaValueNow=${R==="percent"?l:w} .ariaValueText=${R==="percent"?H:$?I: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,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as ae}from"./5QMODV7V.js";import{a as Z,b as f,c as Y,d as J,e as Q,k as n}from"./ZR7MTX2F.js";import{a as ne}from"./VC3LAQJK.js";import{a as ie}from"./ZS5AQJG2.js";import{c as X,d as ee,e as te}from"./Z7ARDFVR.js";import{a as W,c as q,e as K,g as S,h as _}from"./RJQBTNQM.js";import{a as A,b as U}from"./MNOO2GEE.js";import{a as R}from"./AN7BJW6E.js";import{b as G}from"./6G4YIOVX.js";import{a as M}from"./EU53PNIW.js";import{a as j}from"./UMUEMXJF.js";import{b as L}from"./GBKXT23N.js";import{a as y}from"./KJXOD5Z2.js";import"./UBGSVRI6.js";import{e as P,o as $,w as V}from"./S4PILGWU.js";import"./OFPYAEOU.js";import{A as D,B as k,C as w,D as C,E as s,I as N,J as O,P as F,g as T,h as c,l as d,o as x}from"./C7SWOQAB.js";var a={loader:"loader",clearButton:"clear-button",clearable:"clearable",inputIcon:"icon",prefix:"prefix",suffix:"suffix",numberButtonWrapper:"number-button-wrapper",buttonItemHorizontal:"number-button-item--horizontal",wrapper:"element-wrapper",inputWrapper:"wrapper",actionWrapper:"action-wrapper",numberButtonItem:"number-button-item",hasSuffix:"has-suffix",hasPrefix:"has-prefix"},re={validationMessage:"inputNumberValidationMessage"},ce={action:"action"},B={clear:"x",chevronUp:"chevron-up",chevronDown:"chevron-down"},oe={up:"up",down:"down"},ue=T`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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:block}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{font-size:var(--calcite-font-size--2);line-height:1rem;block-size:var(--calcite-input-number-height, 1.5rem)}:host([scale=s]) input{padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .has-prefix input{padding-inline-start:var(--calcite-spacing-xxs)}:host([scale=s]) .prefix{padding-inline:var(--calcite-spacing-sm) var(--calcite-spacing-xxs)}:host([scale=s]) .has-suffix input{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s]) .suffix{padding-inline:var(--calcite-spacing-xxs) var(--calcite-spacing-sm)}:host([scale=s]) .number-button-wrapper,:host([scale=s]) .action-wrapper{block-size:var(--calcite-input-number-height, 1.5rem)}:host([scale=s]) .clear-button{min-block-size:1.5rem;min-inline-size:1.5rem}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{font-size:var(--calcite-font-size--1);line-height:1rem;block-size:var(--calcite-input-number-height, 2rem)}:host([scale=m]) input{padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .has-prefix input{padding-inline-start:var(--calcite-spacing-xs)}:host([scale=m]) .prefix{padding-inline:var(--calcite-spacing-md) var(--calcite-spacing-xs)}:host([scale=m]) .has-suffix input{padding-inline-end:var(--calcite-spacing-xs)}:host([scale=m]) .suffix{padding-inline:var(--calcite-spacing-xs) var(--calcite-spacing-md)}:host([scale=m]) .number-button-wrapper,:host([scale=m]) .action-wrapper{block-size:var(--calcite-input-number-height, 2rem)}:host([scale=m]) .clear-button{min-block-size:2rem;min-inline-size:2rem}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{font-size:var(--calcite-font-size-0);line-height:1.25rem;block-size:var(--calcite-input-number-height, 2.75rem)}:host([scale=l]) input{padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .has-prefix input{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=l]) .prefix{padding-inline:var(--calcite-spacing-lg) var(--calcite-spacing-sm)}:host([scale=l]) .has-suffix input{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=l]) .suffix{padding-inline:var(--calcite-spacing-sm) var(--calcite-spacing-lg)}:host([scale=l]) .number-button-wrapper,:host([scale=l]) .action-wrapper{block-size:var(--calcite-input-number-height, 2.75rem)}:host([scale=l]) .clear-button{min-block-size:2.75rem;min-inline-size:2.75rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}input{transition:var(--calcite-animation-timing),block-size 0,outline-offset 0s;-webkit-appearance:none;position:relative;margin:0;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;text-overflow:ellipsis;font-family:inherit;font-weight:var(--calcite-font-weight-normal);background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-number-text-color, var(--calcite-color-text-1));border-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp));text-align:var(--calcite-internal-input-number-alignment)}input:placeholder-shown{text-overflow:ellipsis}input{border-width:1px;border-style:solid;border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input))}input::placeholder,input:-ms-input-placeholder,input::-ms-input-placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-number-placeholder-text-color, var(--calcite-color-text-3))}input:focus{border-color:var(--calcite-color-brand);color:var(--calcite-input-number-text-color-focus, var(--calcite-color-text-1))}input[readonly]{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-input-number-background-color, var(--calcite-color-background))}input[readonly]:focus{color:var(--calcite-input-number-text-color-focus, var(--calcite-color-text-1))}input{outline-color:transparent}input:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([status=invalid]) input{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) input:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([scale=s]) .icon{inset-inline-start:.5rem}:host([scale=m]) .icon{inset-inline-start:.75rem}:host([scale=l]) .icon{inset-inline-start:1rem}:host([icon][scale=s]) input{padding-inline-start:2rem}:host([icon][scale=m]) input{padding-inline-start:2.5rem}:host([icon][scale=l]) input{padding-inline-start:3.5rem}.element-wrapper{position:relative;order:3;display:inline-flex;flex:1 1 0%;align-items:center;isolation:isolate}.icon{pointer-events:none;position:absolute;z-index:var(--calcite-z-index);display:block;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;--calcite-icon-color: var(--calcite-input-number-icon-color, var(--calcite-color-text-3))}.clear-button{pointer-events:initial;order:4;margin:0;box-sizing:border-box;display:flex;min-block-size:100%;cursor:pointer;align-items:center;justify-content:center;align-self:stretch;border-width:1px;border-style:solid;outline-color:transparent;border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-actions-background-color, var(--calcite-color-foreground-1));border-inline-start-width:0px}.clear-button calcite-icon{--calcite-icon-color: var(--calcite-input-actions-icon-color, var(--calcite-color-text-3))}.clear-button:hover{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;background-color:var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-2))}.clear-button:hover calcite-icon{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;--calcite-icon-color: var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.clear-button:active{background-color:var(--calcite-input-actions-background-color-press, var(--calcite-color-foreground-3))}.clear-button:active calcite-icon{--calcite-icon-color: var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.clear-button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.clear-button:disabled{opacity:var(--calcite-opacity-disabled)}.has-suffix .clear-button{border-inline-end-width:0}.loader{inset-block-start:1px;inset-inline:1px;pointer-events:none;position:absolute;display:block}.loader calcite-progress{--calcite-progress-background-color: var(--calcite-input-loading-background-color);--calcite-progress-fill-color: var(--calcite-input-loading-fill-color)}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;line-height:1;font-weight:var(--calcite-font-weight-regular);border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input))}.prefix{order:2;border-inline-end-width:0px;inline-size:var(--calcite-input-prefix-size, auto);background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-prefix-text-color, var(--calcite-color-text-3))}.suffix{order:5;border-inline-start-width:0px;inline-size:var(--calcite-input-suffix-size, auto);background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-suffix-text-color, var(--calcite-color-text-3))}:host([alignment=start]){--calcite-internal-input-number-alignment: start}:host([alignment=center]){--calcite-internal-input-number-alignment: center}:host([alignment=end]){--calcite-internal-input-number-alignment: end}.number-button-wrapper{pointer-events:none;order:6;box-sizing:border-box;display:flex;flex-direction:column;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}:host([number-button-type=vertical]) .wrapper{flex-direction:row;display:flex}:host([number-button-type=vertical]) input{order:2}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=down] calcite-icon{transform:rotate(-90deg)}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=up] calcite-icon{transform:rotate(-90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down],.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:1;max-block-size:100%;min-block-size:100%;align-self:stretch}.number-button-item.number-button-item--horizontal[data-adjustment=down] calcite-icon,.number-button-item.number-button-item--horizontal[data-adjustment=up] calcite-icon{transform:rotate(90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down]{border-inline-start-width:1px;border-inline-end-width:0px}.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:5}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px}.number-button-item{max-block-size:50%;min-block-size:50%;pointer-events:initial;margin:0;box-sizing:border-box;display:flex;cursor:pointer;align-items:center;align-self:center;border-width:1px;border-style:solid;padding-block:0px;padding-inline:.5rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-inline-start-width:0px;border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-actions-background-color, var(--calcite-color-foreground-1))}.number-button-item calcite-icon{pointer-events:none;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;--calcite-icon-color: var(--calcite-input-actions-icon-color, var(--calcite-color-text-3))}.number-button-item:disabled{pointer-events:none}.number-button-item:hover{background-color:var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-2))}.number-button-item:hover calcite-icon{--calcite-icon-color: var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.number-button-item:active{background-color:var(--calcite-input-actions-background-color-press, var(--calcite-color-foreground-3))}.number-button-item:active calcite-icon{--calcite-icon-color: var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.prefix,:host([number-button-type=horizontal]) .number-button-item[data-adjustment=down]{border-start-start-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp));border-end-start-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host([read-only]) .suffix,:host([read-only]) .wrapper:not(.has-suffix) .clear-button,:host([number-button-type=horizontal]) .number-button-item[data-adjustment=up]{border-end-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp));border-start-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px;border-end-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]{border-start-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host(:not([read-only])[number-button-type=horizontal]) .prefix,:host(:not([read-only])[number-button-type=horizontal]) input,.has-prefix input{border-start-start-radius:0;border-end-start-radius:0}:host(:not([status=invalid])) .has-prefix input{border-inline-start-width:0}:host(:not([status=invalid])) .has-suffix input{border-inline-end-width:0}.has-suffix input,:host .clearable input,:host(:not([read-only])) input,:host .suffix,:host .clear-button{border-start-end-radius:0;border-end-end-radius:0}:host .wrapper{position:relative;display:flex;flex-direction:row;align-items:center}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-color-border-1)}input.inline-child{background-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}input.inline-child .editing-enabled{background-color:inherit}input.inline-child:not(.editing-enabled){display:flex;cursor:pointer;text-overflow:ellipsis;border-color:transparent;padding-inline-start:0}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,H=class extends C{constructor(){super(),this.actionWrapperRef=k(),this.attributeWatch=L(["autofocus","enterkeyhint","inputmode"],this.handleGlobalAttributesChanged),this.childNumberRef=k(),this.inputWrapperRef=k(),this.onHiddenFormInputInput=e=>{e.target.name===this.name&&this.setNumberValue({value:e.target.value,origin:"direct"}),this.setFocus(),e.stopPropagation()},this.previousValueOrigin="initial",this.userChangedValue=!1,this._value="",this.messages=M(),this.focusSetter=j()(this),this.slottedActionElDisabledInternally=!1,this.alignment="start",this.clearable=!1,this.disabled=!1,this.editingEnabled=!1,this.groupSeparator=!1,this.iconFlipRtl=!1,this.integer=!1,this.loading=!1,this.localeFormat=!1,this.numberButtonType="vertical",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteInputNumberChange=x({cancelable:!1}),this.calciteInputNumberInput=x(),this.calciteInternalInputNumberBlur=x({cancelable:!1}),this.calciteInternalInputNumberFocus=x({cancelable:!1}),this.listen("click",this.clickHandler),this.listen("keydown",this.keyDownHandler)}static{this.properties={displayedValue:[16,{},{state:!0}],slottedActionElDisabledInternally:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],autocomplete:[0,{},{attribute:!1}],clearable:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],editingEnabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:N,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],integer:[5,{},{type:Boolean}],label:1,labelText:1,loading:[7,{},{reflect:!0,type:Boolean}],localeFormat:[5,{},{type:Boolean}],max:[11,{},{reflect:!0,type:Number}],maxLength:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],min:[11,{},{reflect:!0,type:Number}],minLength:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberButtonType:[3,{},{reflect:!0}],numberingSystem:[3,{},{reflect:!0}],placeholder:1,prefixText:1,readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],step:[3,{},{reflect:!0}],suffixText:1,validationIcon:[3,{converter:N,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.styles=ue}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueWatcher(e,t),e&&this._value===""&&this.setNumberValue({origin:"reset",value:t}))}async selectText(){this.childNumberRef.value?.select()}async setFocus(e){return this.focusSetter(()=>this.childNumberRef.value,e)}connectedCallback(){super.connectedCallback(),this.inlineEditableEl=this.el.closest("calcite-inline-editable"),this.inlineEditableEl&&(this.editingEnabled=this.inlineEditableEl.editingEnabled||!1),X(this),q(this),this.el.addEventListener(S,this.onHiddenFormInputInput)}async load(){this.maxString=this.max?.toString(),this.minString=this.min?.toString(),this.requestedIcon=$({},this.icon,"number"),this.setPreviousEmittedNumberValue(this.value),this.setPreviousNumberValue(this.value),this.warnAboutInvalidNumberValue(this.value),this.value==="Infinity"||this.value==="-Infinity"?(this.displayedValue=this.value,this.previousEmittedNumberValue=this.value):this.setNumberValue({origin:"connected",value:f(this.value)?this.value:""})}willUpdate(e){e.has("max")&&(this.maxString=this.max?.toString()||null),e.has("min")&&(this.minString=this.min?.toString()||null),e.has("icon")&&(this.requestedIcon=$({},this.icon,"number")),e.has("messages")&&(n.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:!1})}updated(){A(this)}disconnectedCallback(){super.disconnectedCallback(),ee(this),K(this),this.el.removeEventListener(S,this.onHiddenFormInputInput)}get isClearable(){return this.clearable&&this.value.length>0}handleGlobalAttributesChanged(){this.requestUpdate()}valueWatcher(e,t){if(!this.userChangedValue){if(e==="Infinity"||e==="-Infinity"){this.displayedValue=e,this.previousEmittedNumberValue=e;return}this.setNumberValue({origin:"direct",previousValue:t,value:e==null||e==""?"":f(e)?e:this.previousValue||""}),this.warnAboutInvalidNumberValue(e)}this.userChangedValue=!1}keyDownHandler(e){this.readOnly||this.disabled||e.defaultPrevented||(this.isClearable&&e.key==="Escape"&&(this.clearInputValue(e),e.preventDefault()),e.key==="Enter"&&W(this)&&e.preventDefault())}onLabelClick(){this.setFocus()}incrementOrDecrementNumberValue(e,t,i,p){let{value:r}=this;if(r==="Infinity"||r==="-Infinity")return;let u=e==="up"?1:-1,o=this.integer&&this.step!=="any"?Math.round(this.step):this.step,m=o==="any"?1:Math.abs(o||1),h=new Z(r!==""?r:"0").add(`${m*u}`),g=()=>typeof i=="number"&&!isNaN(i)&&h.subtract(`${i}`).isNegative,b=()=>typeof t=="number"&&!isNaN(t)&&!h.subtract(`${t}`).isNegative,l=g()?`${i}`:b()?`${t}`:h.toString();this.setNumberValue({committing:!0,nativeEvent:p,origin:"user",value:l})}clearInputValue(e){this.setNumberValue({committing:!0,nativeEvent:e,origin:"user",value:""})}emitChangeIfUserModified(){this.previousValueOrigin==="user"&&this.value!==this.previousEmittedNumberValue&&(this.calciteInputNumberChange.emit(),this.setPreviousEmittedNumberValue(this.value))}inputNumberBlurHandler(){window.clearInterval(this.nudgeNumberValueIntervalId),this.calciteInternalInputNumberBlur.emit(),this.emitChangeIfUserModified()}clickHandler(e){if(this.disabled)return;let t=e.composedPath();!t.includes(this.inputWrapperRef.value)||t.includes(this.actionWrapperRef.value)||this.setFocus()}inputNumberFocusHandler(){this.calciteInternalInputNumberFocus.emit()}inputNumberInputHandler(e){if(this.disabled||this.readOnly||this.value==="Infinity"||this.value==="-Infinity")return;let t=e.target.value;n.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};let i=n.delocalize(t);e.inputType==="insertFromPaste"?((!f(i)||this.integer&&(i.includes("e")||i.includes(".")))&&e.preventDefault(),this.setNumberValue({nativeEvent:e,origin:"user",value:Y(i)}),this.childNumberRef.value.value=this.displayedValue):this.setNumberValue({nativeEvent:e,origin:"user",value:i})}inputNumberKeyDownHandler(e){if(this.disabled||this.readOnly)return;if(this.value==="Infinity"||this.value==="-Infinity"){e.preventDefault(),(e.key==="Backspace"||e.key==="Delete")&&this.clearInputValue(e);return}if(e.key==="ArrowUp"){e.preventDefault(),this.nudgeNumberValue("up",e);return}if(e.key==="ArrowDown"){e.preventDefault(),this.nudgeNumberValue("down",e);return}let t=[...G,"ArrowLeft","ArrowRight","Backspace","Delete","Enter","Escape","Tab"];if(e.altKey||e.ctrlKey||e.metaKey)return;let i=e.shiftKey&&e.key==="Tab";if(t.includes(e.key)||i){e.key==="Enter"&&this.emitChangeIfUserModified();return}n.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},!(e.key===n.decimal&&!this.integer&&(!this.value&&!this.childNumberRef.value.value||this.value&&this.childNumberRef.value.value.indexOf(n.decimal)===-1))&&(/[eE]/.test(e.key)&&!this.integer&&(!this.value&&!this.childNumberRef.value.value||this.value&&!/[eE]/.test(this.childNumberRef.value.value))||e.key==="-"&&(!this.value&&!this.childNumberRef.value.value||this.value&&this.childNumberRef.value.value.split("-").length<=2)||e.preventDefault())}nudgeNumberValue(e,t){if(t instanceof KeyboardEvent&&t.repeat)return;let i=this.maxString?parseFloat(this.maxString):null,p=this.minString?parseFloat(this.minString):null,r=150;this.incrementOrDecrementNumberValue(e,i,p,t),this.nudgeNumberValueIntervalId&&window.clearInterval(this.nudgeNumberValueIntervalId);let u=!0;this.nudgeNumberValueIntervalId=window.setInterval(()=>{if(u){u=!1;return}this.incrementOrDecrementNumberValue(e,i,p,t)},r)}nudgeButtonPointerUpHandler(e){V(e)&&window.clearInterval(this.nudgeNumberValueIntervalId)}nudgeButtonPointerOutHandler(){window.clearInterval(this.nudgeNumberValueIntervalId)}nudgeButtonPointerDownHandler(e){if(!V(e))return;e.preventDefault();let t=e.target.dataset.adjustment;this.disabled||this.nudgeNumberValue(t,e)}syncHiddenFormInput(e){ae("number",this,e)}setInputNumberValue(e){this.childNumberRef.value&&(this.childNumberRef.value.value=e)}setPreviousEmittedNumberValue(e){this.previousEmittedNumberValue=this.normalizeValue(e)}normalizeValue(e){return f(e)?e:""}setPreviousNumberValue(e){this.previousValue=this.normalizeValue(e)}setNumberValue({committing:e=!1,nativeEvent:t,origin:i,previousValue:p,value:r}){n.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};let u=this.previousValue?.length>r.length||this.value?.length>r.length,o=this.integer?r.replace(/[e.]/g,""):r,m=o.charAt(o.length-1)===".",v=o.charAt(0)==="-",h=o.match(/^-?(0+)\d/),g=m&&u?o:J(o),b=r&&!g?f(this.previousValue)?this.previousValue:"":g,l=n.localize(b);i!=="connected"&&!m&&(l=Q(l,b,n)),m&&u&&(l=`${l}${n.decimal}`),h&&(l=`${v?l.charAt(0):""}${n.localize("0").repeat(h[1].length)}${v?l.slice(1):l}`),this.displayedValue=l,this.setPreviousNumberValue(p??this.value),this.previousValueOrigin=i,this.userChangedValue=i==="user"&&this.value!==b;let E=["-","."].includes(b)?"":b;this.value=E;let le=new Set(["e","E",n.decimal,n.minusSign,n.group,...n.digits]),I=this.childNumberRef.value?.value;if(I){let z=Array.from(I).filter(se=>le.has(se)).join("");z!==I&&this.setInputNumberValue(z)}i==="direct"&&(this.setInputNumberValue(l),this.setPreviousEmittedNumberValue(E)),t&&(this.calciteInputNumberInput.emit().defaultPrevented?(this.value=this.previousValue,this.displayedValue=n.localize(this.previousValue)):e&&this.emitChangeIfUserModified())}inputNumberKeyUpHandler(){window.clearInterval(this.nudgeNumberValueIntervalId)}warnAboutInvalidNumberValue(e){e&&!f(e)&&console.warn(`The specified value "${e}" cannot be parsed, or is out of range.`)}render(){let e=P(this.el),t=c`<div class=${s(a.loader)}><calcite-progress .label=${this.messages.loading} type=indeterminate></calcite-progress></div>`,i=c`<button .ariaLabel=${this.messages.clear} class=${s(a.clearButton)} .disabled=${this.disabled||this.readOnly} @click=${this.clearInputValue} tabindex=-1 type=button><calcite-icon .icon=${B.clear} .scale=${y(this.scale)}></calcite-icon></button>`,p=c`<calcite-icon class=${s(a.inputIcon)} .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${y(this.scale)}></calcite-icon>`,r=this.numberButtonType==="horizontal",u=c`<button aria-hidden=true class=${s({[a.numberButtonItem]:!0,[a.buttonItemHorizontal]:r})} data-adjustment=${oe.up} .disabled=${this.disabled||this.readOnly} @pointerdown=${this.nudgeButtonPointerDownHandler} @pointerout=${this.nudgeButtonPointerOutHandler} @pointerup=${this.nudgeButtonPointerUpHandler} tabindex=-1 type=button><calcite-icon .icon=${B.chevronUp} .scale=${y(this.scale)}></calcite-icon></button>`,o=c`<button aria-hidden=true class=${s({[a.numberButtonItem]:!0,[a.buttonItemHorizontal]:r})} data-adjustment=${oe.down} .disabled=${this.disabled||this.readOnly} @pointerdown=${this.nudgeButtonPointerDownHandler} @pointerout=${this.nudgeButtonPointerOutHandler} @pointerup=${this.nudgeButtonPointerUpHandler} tabindex=-1 type=button><calcite-icon .icon=${B.chevronDown} .scale=${y(this.scale)}></calcite-icon></button>`,m=c`<div class=${s(a.numberButtonWrapper)}>${u}${o}</div>`,v=c`<div class=${s(a.prefix)}>${this.prefixText}</div>`,h=c`<div class=${s(a.suffix)}>${this.suffixText}</div>`,g=R("localized-input",c`<input aria-errormessage=${re.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${te(this)} autocomplete=${this.autocomplete??d} .autofocus=${this.el.autofocus} value=${this.defaultValue??d} .disabled=${this.disabled} enterkeyhint=${this.el.enterKeyHint??d} inputmode=${(this.el.inputMode||"decimal")??d} maxlength=${this.maxLength??d} minlength=${this.minLength??d} name=${d} @blur=${this.inputNumberBlurHandler} @focus=${this.inputNumberFocusHandler} @input=${this.inputNumberInputHandler} @keydown=${this.inputNumberKeyDownHandler} @keyup=${this.inputNumberKeyUpHandler} placeholder=${(this.placeholder||"")??d} .readOnly=${this.readOnly} .required=${this.required} type=text .value=${D(this.displayedValue??"")} ${w(this.childNumberRef)}>`);return U({disabled:this.disabled,children:c`${this.labelText&&ie({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${s({[a.inputWrapper]:!0,[O.rtl]:e==="rtl",[a.hasSuffix]:this.suffixText,[a.hasPrefix]:this.prefixText,[a.clearable]:this.isClearable})} ${w(this.inputWrapperRef)}>${this.numberButtonType==="horizontal"&&!this.readOnly?o:null}${this.prefixText?v:null}<div class=${s(a.wrapper)}>${g}${this.isClearable?i:null}${this.requestedIcon?p:null}${this.loading?t:null}</div><div class=${s(a.actionWrapper)} ${w(this.actionWrapperRef)}><slot name=${ce.action}></slot></div>${this.numberButtonType==="vertical"&&!this.readOnly?m:null}${this.suffixText?h:null}${this.numberButtonType==="horizontal"&&!this.readOnly?u:null}${_({component:this})}</div>${this.validationMessage&&this.status==="invalid"?ne({icon:this.validationIcon,id:re.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};F("calcite-input-number",H);export{H as InputNumber};
|
|
3
|
+
v5.0.0-next.3 */
|
|
4
|
+
import{a as ae}from"./GT3B6N5Y.js";import{a as Z,b as f,c as Y,d as J,e as Q,k as n}from"./I2EB746H.js";import{a as ne}from"./IWU3WQTA.js";import{a as ie}from"./E2ETQPML.js";import{c as X,d as ee,e as te}from"./5JALWDSF.js";import{a as W,c as q,e as K,g as S,h as _}from"./RWVRFF3I.js";import{a as A,b as U}from"./EU6IVBMM.js";import{a as R}from"./7WAFUV2T.js";import{b as G}from"./L6HFE67F.js";import{a as M}from"./WIJWBGXQ.js";import{a as j}from"./XWXCOJUO.js";import{b as L}from"./UXWFYSWM.js";import{a as y}from"./JW4SOJWB.js";import"./P2RYGBBZ.js";import{e as P,o as $,w as V}from"./SLICSH62.js";import"./DNM3U3Z7.js";import{A as D,B as k,C as w,D as C,E as s,I as N,J as O,P as F,g as T,h as c,l as d,o as x}from"./ALOAVLGK.js";var a={loader:"loader",clearButton:"clear-button",clearable:"clearable",inputIcon:"icon",prefix:"prefix",suffix:"suffix",numberButtonWrapper:"number-button-wrapper",buttonItemHorizontal:"number-button-item--horizontal",wrapper:"element-wrapper",inputWrapper:"wrapper",actionWrapper:"action-wrapper",numberButtonItem:"number-button-item",hasSuffix:"has-suffix",hasPrefix:"has-prefix"},re={validationMessage:"inputNumberValidationMessage"},ce={action:"action"},B={clear:"x",chevronUp:"chevron-up",chevronDown:"chevron-down"},oe={up:"up",down:"down"},ue=T`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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:block}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{font-size:var(--calcite-font-size--2);line-height:1rem;block-size:var(--calcite-input-number-height, 1.5rem)}:host([scale=s]) input{padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .has-prefix input{padding-inline-start:var(--calcite-spacing-xxs)}:host([scale=s]) .prefix{padding-inline:var(--calcite-spacing-sm) var(--calcite-spacing-xxs)}:host([scale=s]) .has-suffix input{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s]) .suffix{padding-inline:var(--calcite-spacing-xxs) var(--calcite-spacing-sm)}:host([scale=s]) .number-button-wrapper,:host([scale=s]) .action-wrapper{block-size:var(--calcite-input-number-height, 1.5rem)}:host([scale=s]) .clear-button{min-block-size:1.5rem;min-inline-size:1.5rem}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{font-size:var(--calcite-font-size--1);line-height:1rem;block-size:var(--calcite-input-number-height, 2rem)}:host([scale=m]) input{padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .has-prefix input{padding-inline-start:var(--calcite-spacing-xs)}:host([scale=m]) .prefix{padding-inline:var(--calcite-spacing-md) var(--calcite-spacing-xs)}:host([scale=m]) .has-suffix input{padding-inline-end:var(--calcite-spacing-xs)}:host([scale=m]) .suffix{padding-inline:var(--calcite-spacing-xs) var(--calcite-spacing-md)}:host([scale=m]) .number-button-wrapper,:host([scale=m]) .action-wrapper{block-size:var(--calcite-input-number-height, 2rem)}:host([scale=m]) .clear-button{min-block-size:2rem;min-inline-size:2rem}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{font-size:var(--calcite-font-size-0);line-height:1.25rem;block-size:var(--calcite-input-number-height, 2.75rem)}:host([scale=l]) input{padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .has-prefix input{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=l]) .prefix{padding-inline:var(--calcite-spacing-lg) var(--calcite-spacing-sm)}:host([scale=l]) .has-suffix input{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=l]) .suffix{padding-inline:var(--calcite-spacing-sm) var(--calcite-spacing-lg)}:host([scale=l]) .number-button-wrapper,:host([scale=l]) .action-wrapper{block-size:var(--calcite-input-number-height, 2.75rem)}:host([scale=l]) .clear-button{min-block-size:2.75rem;min-inline-size:2.75rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}input{transition:var(--calcite-animation-timing),block-size 0,outline-offset 0s;-webkit-appearance:none;position:relative;margin:0;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;text-overflow:ellipsis;font-family:inherit;font-weight:var(--calcite-font-weight-normal);background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-number-text-color, var(--calcite-color-text-1));border-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp));text-align:var(--calcite-internal-input-number-alignment)}input:placeholder-shown{text-overflow:ellipsis}input{border-width:1px;border-style:solid;border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input))}input::placeholder,input:-ms-input-placeholder,input::-ms-input-placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-number-placeholder-text-color, var(--calcite-color-text-3))}input:focus{border-color:var(--calcite-color-brand);color:var(--calcite-input-number-text-color-focus, var(--calcite-color-text-1))}input[readonly]{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-input-number-background-color, var(--calcite-color-background))}input[readonly]:focus{color:var(--calcite-input-number-text-color-focus, var(--calcite-color-text-1))}input{outline-color:transparent}input:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([status=invalid]) input{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) input:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([scale=s]) .icon{inset-inline-start:.5rem}:host([scale=m]) .icon{inset-inline-start:.75rem}:host([scale=l]) .icon{inset-inline-start:1rem}:host([icon][scale=s]) input{padding-inline-start:2rem}:host([icon][scale=m]) input{padding-inline-start:2.5rem}:host([icon][scale=l]) input{padding-inline-start:3.5rem}.element-wrapper{position:relative;order:3;display:inline-flex;flex:1 1 0%;align-items:center;isolation:isolate}.icon{pointer-events:none;position:absolute;z-index:var(--calcite-z-index);display:block;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;--calcite-icon-color: var(--calcite-input-number-icon-color, var(--calcite-color-text-3))}.clear-button{pointer-events:initial;order:4;margin:0;box-sizing:border-box;display:flex;min-block-size:100%;cursor:pointer;align-items:center;justify-content:center;align-self:stretch;border-width:1px;border-style:solid;outline-color:transparent;border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-actions-background-color, var(--calcite-color-foreground-1));border-inline-start-width:0px}.clear-button calcite-icon{--calcite-icon-color: var(--calcite-input-actions-icon-color, var(--calcite-color-text-3))}.clear-button:hover{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;background-color:var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-2))}.clear-button:hover calcite-icon{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;--calcite-icon-color: var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.clear-button:active{background-color:var(--calcite-input-actions-background-color-press, var(--calcite-color-foreground-3))}.clear-button:active calcite-icon{--calcite-icon-color: var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.clear-button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.clear-button:disabled{opacity:var(--calcite-opacity-disabled)}.has-suffix .clear-button{border-inline-end-width:0}.loader{inset-block-start:1px;inset-inline:1px;pointer-events:none;position:absolute;display:block}.loader calcite-progress{--calcite-progress-background-color: var(--calcite-input-loading-background-color);--calcite-progress-fill-color: var(--calcite-input-loading-fill-color)}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;line-height:1;font-weight:var(--calcite-font-weight-regular);border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input))}.prefix{order:2;border-inline-end-width:0px;inline-size:var(--calcite-input-prefix-size, auto);background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-prefix-text-color, var(--calcite-color-text-3))}.suffix{order:5;border-inline-start-width:0px;inline-size:var(--calcite-input-suffix-size, auto);background-color:var(--calcite-input-number-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-suffix-text-color, var(--calcite-color-text-3))}:host([alignment=start]){--calcite-internal-input-number-alignment: start}:host([alignment=center]){--calcite-internal-input-number-alignment: center}:host([alignment=end]){--calcite-internal-input-number-alignment: end}.number-button-wrapper{pointer-events:none;order:6;box-sizing:border-box;display:flex;flex-direction:column;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}:host([number-button-type=vertical]) .wrapper{flex-direction:row;display:flex}:host([number-button-type=vertical]) input{order:2}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=down] calcite-icon{transform:rotate(-90deg)}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=up] calcite-icon{transform:rotate(-90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down],.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:1;max-block-size:100%;min-block-size:100%;align-self:stretch}.number-button-item.number-button-item--horizontal[data-adjustment=down] calcite-icon,.number-button-item.number-button-item--horizontal[data-adjustment=up] calcite-icon{transform:rotate(90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down]{border-inline-start-width:1px;border-inline-end-width:0px}.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:5}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px}.number-button-item{max-block-size:50%;min-block-size:50%;pointer-events:initial;margin:0;box-sizing:border-box;display:flex;cursor:pointer;align-items:center;align-self:center;border-width:1px;border-style:solid;padding-block:0px;padding-inline:.5rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-inline-start-width:0px;border-color:var(--calcite-input-number-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-actions-background-color, var(--calcite-color-foreground-1))}.number-button-item calcite-icon{pointer-events:none;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;--calcite-icon-color: var(--calcite-input-actions-icon-color, var(--calcite-color-text-3))}.number-button-item:disabled{pointer-events:none}.number-button-item:hover{background-color:var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-2))}.number-button-item:hover calcite-icon{--calcite-icon-color: var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.number-button-item:active{background-color:var(--calcite-input-actions-background-color-press, var(--calcite-color-foreground-3))}.number-button-item:active calcite-icon{--calcite-icon-color: var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.prefix,:host([number-button-type=horizontal]) .number-button-item[data-adjustment=down]{border-start-start-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp));border-end-start-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host([read-only]) .suffix,:host([read-only]) .wrapper:not(.has-suffix) .clear-button,:host([number-button-type=horizontal]) .number-button-item[data-adjustment=up]{border-end-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp));border-start-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px;border-end-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]{border-start-end-radius:var(--calcite-input-number-corner-radius, var(--calcite-corner-radius-sharp))}:host(:not([read-only])[number-button-type=horizontal]) .prefix,:host(:not([read-only])[number-button-type=horizontal]) input,.has-prefix input{border-start-start-radius:0;border-end-start-radius:0}:host(:not([status=invalid])) .has-prefix input{border-inline-start-width:0}:host(:not([status=invalid])) .has-suffix input{border-inline-end-width:0}.has-suffix input,:host .clearable input,:host(:not([read-only])) input,:host .suffix,:host .clear-button{border-start-end-radius:0;border-end-end-radius:0}:host .wrapper{position:relative;display:flex;flex-direction:row;align-items:center}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-color-border-1)}input.inline-child{background-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}input.inline-child .editing-enabled{background-color:inherit}input.inline-child:not(.editing-enabled){display:flex;cursor:pointer;text-overflow:ellipsis;border-color:transparent;padding-inline-start:0}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,H=class extends C{constructor(){super(),this.actionWrapperRef=k(),this.attributeWatch=L(["autofocus","enterkeyhint","inputmode"],this.handleGlobalAttributesChanged),this.childNumberRef=k(),this.inputWrapperRef=k(),this.onHiddenFormInputInput=e=>{e.target.name===this.name&&this.setNumberValue({value:e.target.value,origin:"direct"}),this.setFocus(),e.stopPropagation()},this.previousValueOrigin="initial",this.userChangedValue=!1,this._value="",this.messages=M(),this.focusSetter=j()(this),this.slottedActionElDisabledInternally=!1,this.alignment="start",this.clearable=!1,this.disabled=!1,this.editingEnabled=!1,this.groupSeparator=!1,this.iconFlipRtl=!1,this.integer=!1,this.loading=!1,this.localeFormat=!1,this.numberButtonType="vertical",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteInputNumberChange=x({cancelable:!1}),this.calciteInputNumberInput=x(),this.calciteInternalInputNumberBlur=x({cancelable:!1}),this.calciteInternalInputNumberFocus=x({cancelable:!1}),this.listen("click",this.clickHandler),this.listen("keydown",this.keyDownHandler)}static{this.properties={displayedValue:[16,{},{state:!0}],slottedActionElDisabledInternally:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],autocomplete:[0,{},{attribute:!1}],clearable:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],editingEnabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:N,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],integer:[5,{},{type:Boolean}],label:1,labelText:1,loading:[7,{},{reflect:!0,type:Boolean}],localeFormat:[5,{},{type:Boolean}],max:[11,{},{reflect:!0,type:Number}],maxLength:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],min:[11,{},{reflect:!0,type:Number}],minLength:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberButtonType:[3,{},{reflect:!0}],numberingSystem:[3,{},{reflect:!0}],placeholder:1,prefixText:1,readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],step:[3,{},{reflect:!0}],suffixText:1,validationIcon:[3,{converter:N,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.styles=ue}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueWatcher(e,t),e&&this._value===""&&this.setNumberValue({origin:"reset",value:t}))}async selectText(){this.childNumberRef.value?.select()}async setFocus(e){return this.focusSetter(()=>this.childNumberRef.value,e)}connectedCallback(){super.connectedCallback(),this.inlineEditableEl=this.el.closest("calcite-inline-editable"),this.inlineEditableEl&&(this.editingEnabled=this.inlineEditableEl.editingEnabled||!1),X(this),q(this),this.el.addEventListener(S,this.onHiddenFormInputInput)}async load(){this.maxString=this.max?.toString(),this.minString=this.min?.toString(),this.requestedIcon=$({},this.icon,"number"),this.setPreviousEmittedNumberValue(this.value),this.setPreviousNumberValue(this.value),this.warnAboutInvalidNumberValue(this.value),this.value==="Infinity"||this.value==="-Infinity"?(this.displayedValue=this.value,this.previousEmittedNumberValue=this.value):this.setNumberValue({origin:"connected",value:f(this.value)?this.value:""})}willUpdate(e){e.has("max")&&(this.maxString=this.max?.toString()||null),e.has("min")&&(this.minString=this.min?.toString()||null),e.has("icon")&&(this.requestedIcon=$({},this.icon,"number")),e.has("messages")&&(n.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:!1})}updated(){A(this)}disconnectedCallback(){super.disconnectedCallback(),ee(this),K(this),this.el.removeEventListener(S,this.onHiddenFormInputInput)}get isClearable(){return this.clearable&&this.value.length>0}handleGlobalAttributesChanged(){this.requestUpdate()}valueWatcher(e,t){if(!this.userChangedValue){if(e==="Infinity"||e==="-Infinity"){this.displayedValue=e,this.previousEmittedNumberValue=e;return}this.setNumberValue({origin:"direct",previousValue:t,value:e==null||e==""?"":f(e)?e:this.previousValue||""}),this.warnAboutInvalidNumberValue(e)}this.userChangedValue=!1}keyDownHandler(e){this.readOnly||this.disabled||e.defaultPrevented||(this.isClearable&&e.key==="Escape"&&(this.clearInputValue(e),e.preventDefault()),e.key==="Enter"&&W(this)&&e.preventDefault())}onLabelClick(){this.setFocus()}incrementOrDecrementNumberValue(e,t,i,p){let{value:r}=this;if(r==="Infinity"||r==="-Infinity")return;let u=e==="up"?1:-1,o=this.integer&&this.step!=="any"?Math.round(this.step):this.step,m=o==="any"?1:Math.abs(o||1),h=new Z(r!==""?r:"0").add(`${m*u}`),g=()=>typeof i=="number"&&!isNaN(i)&&h.subtract(`${i}`).isNegative,b=()=>typeof t=="number"&&!isNaN(t)&&!h.subtract(`${t}`).isNegative,l=g()?`${i}`:b()?`${t}`:h.toString();this.setNumberValue({committing:!0,nativeEvent:p,origin:"user",value:l})}clearInputValue(e){this.setNumberValue({committing:!0,nativeEvent:e,origin:"user",value:""})}emitChangeIfUserModified(){this.previousValueOrigin==="user"&&this.value!==this.previousEmittedNumberValue&&(this.calciteInputNumberChange.emit(),this.setPreviousEmittedNumberValue(this.value))}inputNumberBlurHandler(){window.clearInterval(this.nudgeNumberValueIntervalId),this.calciteInternalInputNumberBlur.emit(),this.emitChangeIfUserModified()}clickHandler(e){if(this.disabled)return;let t=e.composedPath();!t.includes(this.inputWrapperRef.value)||t.includes(this.actionWrapperRef.value)||this.setFocus()}inputNumberFocusHandler(){this.calciteInternalInputNumberFocus.emit()}inputNumberInputHandler(e){if(this.disabled||this.readOnly||this.value==="Infinity"||this.value==="-Infinity")return;let t=e.target.value;n.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};let i=n.delocalize(t);e.inputType==="insertFromPaste"?((!f(i)||this.integer&&(i.includes("e")||i.includes(".")))&&e.preventDefault(),this.setNumberValue({nativeEvent:e,origin:"user",value:Y(i)}),this.childNumberRef.value.value=this.displayedValue):this.setNumberValue({nativeEvent:e,origin:"user",value:i})}inputNumberKeyDownHandler(e){if(this.disabled||this.readOnly)return;if(this.value==="Infinity"||this.value==="-Infinity"){e.preventDefault(),(e.key==="Backspace"||e.key==="Delete")&&this.clearInputValue(e);return}if(e.key==="ArrowUp"){e.preventDefault(),this.nudgeNumberValue("up",e);return}if(e.key==="ArrowDown"){e.preventDefault(),this.nudgeNumberValue("down",e);return}let t=[...G,"ArrowLeft","ArrowRight","Backspace","Delete","Enter","Escape","Tab"];if(e.altKey||e.ctrlKey||e.metaKey)return;let i=e.shiftKey&&e.key==="Tab";if(t.includes(e.key)||i){e.key==="Enter"&&this.emitChangeIfUserModified();return}n.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},!(e.key===n.decimal&&!this.integer&&(!this.value&&!this.childNumberRef.value.value||this.value&&this.childNumberRef.value.value.indexOf(n.decimal)===-1))&&(/[eE]/.test(e.key)&&!this.integer&&(!this.value&&!this.childNumberRef.value.value||this.value&&!/[eE]/.test(this.childNumberRef.value.value))||e.key==="-"&&(!this.value&&!this.childNumberRef.value.value||this.value&&this.childNumberRef.value.value.split("-").length<=2)||e.preventDefault())}nudgeNumberValue(e,t){if(t instanceof KeyboardEvent&&t.repeat)return;let i=this.maxString?parseFloat(this.maxString):null,p=this.minString?parseFloat(this.minString):null,r=150;this.incrementOrDecrementNumberValue(e,i,p,t),this.nudgeNumberValueIntervalId&&window.clearInterval(this.nudgeNumberValueIntervalId);let u=!0;this.nudgeNumberValueIntervalId=window.setInterval(()=>{if(u){u=!1;return}this.incrementOrDecrementNumberValue(e,i,p,t)},r)}nudgeButtonPointerUpHandler(e){V(e)&&window.clearInterval(this.nudgeNumberValueIntervalId)}nudgeButtonPointerOutHandler(){window.clearInterval(this.nudgeNumberValueIntervalId)}nudgeButtonPointerDownHandler(e){if(!V(e))return;e.preventDefault();let t=e.target.dataset.adjustment;this.disabled||this.nudgeNumberValue(t,e)}syncHiddenFormInput(e){ae("number",this,e)}setInputNumberValue(e){this.childNumberRef.value&&(this.childNumberRef.value.value=e)}setPreviousEmittedNumberValue(e){this.previousEmittedNumberValue=this.normalizeValue(e)}normalizeValue(e){return f(e)?e:""}setPreviousNumberValue(e){this.previousValue=this.normalizeValue(e)}setNumberValue({committing:e=!1,nativeEvent:t,origin:i,previousValue:p,value:r}){n.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};let u=this.previousValue?.length>r.length||this.value?.length>r.length,o=this.integer?r.replace(/[e.]/g,""):r,m=o.charAt(o.length-1)===".",v=o.charAt(0)==="-",h=o.match(/^-?(0+)\d/),g=m&&u?o:J(o),b=r&&!g?f(this.previousValue)?this.previousValue:"":g,l=n.localize(b);i!=="connected"&&!m&&(l=Q(l,b,n)),m&&u&&(l=`${l}${n.decimal}`),h&&(l=`${v?l.charAt(0):""}${n.localize("0").repeat(h[1].length)}${v?l.slice(1):l}`),this.displayedValue=l,this.setPreviousNumberValue(p??this.value),this.previousValueOrigin=i,this.userChangedValue=i==="user"&&this.value!==b;let E=["-","."].includes(b)?"":b;this.value=E;let le=new Set(["e","E",n.decimal,n.minusSign,n.group,...n.digits]),I=this.childNumberRef.value?.value;if(I){let z=Array.from(I).filter(se=>le.has(se)).join("");z!==I&&this.setInputNumberValue(z)}i==="direct"&&(this.setInputNumberValue(l),this.setPreviousEmittedNumberValue(E)),t&&(this.calciteInputNumberInput.emit().defaultPrevented?(this.value=this.previousValue,this.displayedValue=n.localize(this.previousValue)):e&&this.emitChangeIfUserModified())}inputNumberKeyUpHandler(){window.clearInterval(this.nudgeNumberValueIntervalId)}warnAboutInvalidNumberValue(e){e&&!f(e)&&console.warn(`The specified value "${e}" cannot be parsed, or is out of range.`)}render(){let e=P(this.el),t=c`<div class=${s(a.loader)}><calcite-progress .label=${this.messages.loading} type=indeterminate></calcite-progress></div>`,i=c`<button .ariaLabel=${this.messages.clear} class=${s(a.clearButton)} .disabled=${this.disabled||this.readOnly} @click=${this.clearInputValue} tabindex=-1 type=button><calcite-icon .icon=${B.clear} .scale=${y(this.scale)}></calcite-icon></button>`,p=c`<calcite-icon class=${s(a.inputIcon)} .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${y(this.scale)}></calcite-icon>`,r=this.numberButtonType==="horizontal",u=c`<button aria-hidden=true class=${s({[a.numberButtonItem]:!0,[a.buttonItemHorizontal]:r})} data-adjustment=${oe.up} .disabled=${this.disabled||this.readOnly} @pointerdown=${this.nudgeButtonPointerDownHandler} @pointerout=${this.nudgeButtonPointerOutHandler} @pointerup=${this.nudgeButtonPointerUpHandler} tabindex=-1 type=button><calcite-icon .icon=${B.chevronUp} .scale=${y(this.scale)}></calcite-icon></button>`,o=c`<button aria-hidden=true class=${s({[a.numberButtonItem]:!0,[a.buttonItemHorizontal]:r})} data-adjustment=${oe.down} .disabled=${this.disabled||this.readOnly} @pointerdown=${this.nudgeButtonPointerDownHandler} @pointerout=${this.nudgeButtonPointerOutHandler} @pointerup=${this.nudgeButtonPointerUpHandler} tabindex=-1 type=button><calcite-icon .icon=${B.chevronDown} .scale=${y(this.scale)}></calcite-icon></button>`,m=c`<div class=${s(a.numberButtonWrapper)}>${u}${o}</div>`,v=c`<div class=${s(a.prefix)}>${this.prefixText}</div>`,h=c`<div class=${s(a.suffix)}>${this.suffixText}</div>`,g=R("localized-input",c`<input aria-errormessage=${re.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${te(this)} autocomplete=${this.autocomplete??d} .autofocus=${this.el.autofocus} value=${this.defaultValue??d} .disabled=${this.disabled} enterkeyhint=${this.el.enterKeyHint??d} inputmode=${(this.el.inputMode||"decimal")??d} maxlength=${this.maxLength??d} minlength=${this.minLength??d} name=${d} @blur=${this.inputNumberBlurHandler} @focus=${this.inputNumberFocusHandler} @input=${this.inputNumberInputHandler} @keydown=${this.inputNumberKeyDownHandler} @keyup=${this.inputNumberKeyUpHandler} placeholder=${(this.placeholder||"")??d} .readOnly=${this.readOnly} .required=${this.required} type=text .value=${D(this.displayedValue??"")} ${w(this.childNumberRef)}>`);return U({disabled:this.disabled,children:c`${this.labelText&&ie({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${s({[a.inputWrapper]:!0,[O.rtl]:e==="rtl",[a.hasSuffix]:this.suffixText,[a.hasPrefix]:this.prefixText,[a.clearable]:this.isClearable})} ${w(this.inputWrapperRef)}>${this.numberButtonType==="horizontal"&&!this.readOnly?o:null}${this.prefixText?v:null}<div class=${s(a.wrapper)}>${g}${this.isClearable?i:null}${this.requestedIcon?p:null}${this.loading?t:null}</div><div class=${s(a.actionWrapper)} ${w(this.actionWrapperRef)}><slot name=${ce.action}></slot></div>${this.numberButtonType==="vertical"&&!this.readOnly?m:null}${this.suffixText?h:null}${this.numberButtonType==="horizontal"&&!this.readOnly?u:null}${_({component:this})}</div>${this.validationMessage&&this.status==="invalid"?ne({icon:this.validationIcon,id:re.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};F("calcite-input-number",H);export{H as InputNumber};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.3 */
|
|
4
4
|
var Q=globalThis,Y=Q.ShadowRoot&&(Q.ShadyCSS===void 0||Q.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ut=Symbol(),It=new WeakMap,I=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==ut)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Y&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=It.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&It.set(e,t))}return t}toString(){return this.cssText}},kt=o=>new I(typeof o=="string"?o:o+"",void 0,ut),$e=(o,...t)=>{let e=o.length===1?o[0]:t.reduce(((s,i,n)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1]),o[0]);return new I(e,o,ut)},jt=(o,t)=>{if(Y)o.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),i=Q.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},ft=Y?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return kt(e)})(o):o;var{is:be,defineProperty:_e,getOwnPropertyDescriptor:Ae,getOwnPropertyNames:Ce,getOwnPropertySymbols:we,getPrototypeOf:Oe}=Object,X=globalThis,Ht=X.trustedTypes,Se=Ht?Ht.emptyScript:"",Te=X.reactiveElementPolyfillSupport,k=(o,t)=>o,Z={toAttribute(o,t){switch(t){case Boolean:o=o?Se:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},j=(o,t)=>!be(o,t),zt={attribute:!0,type:String,converter:Z,reflect:!1,useDefault:!1,hasChanged:j};Symbol.metadata??=Symbol("metadata"),X.litPropertyMetadata??=new WeakMap;var b=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=zt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&_e(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){let{get:i,set:n}=Ae(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get:i,set(r){let a=i?.call(this);n?.call(this,r),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??zt}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;let t=Oe(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){let e=this.properties,s=[...Ce(e),...we(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(ft(i))}else t!==void 0&&e.push(ft(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return jt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let n=(s.converter?.toAttribute!==void 0?s.converter:Z).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let n=s.getPropertyOptions(i),r=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:Z;this._$Em=i;let a=r.fromAttribute(e,n.type);this[i]=a??this._$Ej?.get(i)??a,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let i=this.constructor,n=this[t];if(s??=i.getPropertyOptions(t),!((s.hasChanged??j)(n,e)||s.useDefault&&s.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},r){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??e??this[t]),n!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[i,n]of s){let{wrapped:r}=n,a=this[i];r!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,n,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[k("elementProperties")]=new Map,b[k("finalized")]=new Map,Te?.({ReactiveElement:b}),(X.reactiveElementVersions??=[]).push("2.1.1");var yt=globalThis,tt=yt.trustedTypes,Vt=tt?tt.createPolicy("lit-html",{createHTML:o=>o}):void 0,gt="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,vt="?"+_,Pe=`<${vt}>`,S=document,z=()=>S.createComment(""),V=o=>o===null||typeof o!="object"&&typeof o!="function",Et=Array.isArray,Kt=o=>Et(o)||typeof o?.[Symbol.iterator]=="function",mt=`[
|
|
5
5
|
\f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Bt=/-->/g,Wt=/>/g,w=RegExp(`>|${mt}(?:([^\\s"'>=/]+)(${mt}*=${mt}*(?:[^
|
|
6
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ft=/'/g,qt=/"/g,Jt=/^(?:script|style|textarea|title)$/i,$t=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),Cs=$t(1),ws=$t(2),Os=$t(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Gt=new WeakMap,O=S.createTreeWalker(S,129);function Qt(o,t){if(!Et(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vt!==void 0?Vt.createHTML(t):t}var Yt=(o,t)=>{let e=o.length-1,s=[],i,n=t===2?"<svg>":t===3?"<math>":"",r=H;for(let a=0;a<e;a++){let c=o[a],l,u,h=-1,y=0;for(;y<c.length&&(r.lastIndex=y,u=r.exec(c),u!==null);)y=r.lastIndex,r===H?u[1]==="!--"?r=Bt:u[1]!==void 0?r=Wt:u[2]!==void 0?(Jt.test(u[2])&&(i=RegExp("</"+u[2],"g")),r=w):u[3]!==void 0&&(r=w):r===w?u[0]===">"?(r=i??H,h=-1):u[1]===void 0?h=-2:(h=r.lastIndex-u[2].length,l=u[1],r=u[3]===void 0?w:u[3]==='"'?qt:Ft):r===qt||r===Ft?r=w:r===Bt||r===Wt?r=H:(r=w,i=void 0);let g=r===w&&o[a+1].startsWith("/>")?" ":"";n+=r===H?c+Pe:h>=0?(s.push(l),c.slice(0,h)+gt+c.slice(h)+_+g):c+_+(h===-2?a:g)}return[Qt(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},B=class o{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0,a=t.length-1,c=this.parts,[l,u]=Yt(t,e);if(this.el=o.createElement(l,s),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=O.nextNode())!==null&&c.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith(gt)){let y=u[r++],g=i.getAttribute(h).split(_),C=/([.?@])?(.*)/.exec(y);c.push({type:1,index:n,name:C[2],strings:g,ctor:C[1]==="."?st:C[1]==="?"?ot:C[1]==="@"?it:P}),i.removeAttribute(h)}else h.startsWith(_)&&(c.push({type:6,index:n}),i.removeAttribute(h));if(Jt.test(i.tagName)){let h=i.textContent.split(_),y=h.length-1;if(y>0){i.textContent=tt?tt.emptyScript:"";for(let g=0;g<y;g++)i.append(h[g],z()),O.nextNode(),c.push({type:2,index:++n});i.append(h[y],z())}}}else if(i.nodeType===8)if(i.data===vt)c.push({type:2,index:n});else{let h=-1;for(;(h=i.data.indexOf(_,h+1))!==-1;)c.push({type:7,index:n}),h+=_.length-1}n++}}static createElement(t,e){let s=S.createElement("template");return s.innerHTML=t,s}};function T(o,t,e=o,s){if(t===f)return t;let i=s!==void 0?e._$Co?.[s]:e._$Cl,n=V(t)?void 0:t._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,s)),s!==void 0?(e._$Co??=[])[s]=i:e._$Cl=i),i!==void 0&&(t=T(o,i._$AS(o,t.values),i,s)),t}var et=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??S).importNode(e,!0);O.currentNode=i;let n=O.nextNode(),r=0,a=0,c=s[0];for(;c!==void 0;){if(r===c.index){let l;c.type===2?l=new U(n,n.nextSibling,this,t):c.type===1?l=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(l=new nt(n,this,t)),this._$AV.push(l),c=s[++a]}r!==c?.index&&(n=O.nextNode(),r++)}return O.currentNode=S,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},U=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=T(this,t,e),V(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Kt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=B.createElement(Qt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{let n=new et(i,this),r=n.u(this.options);n.p(e),this.T(r),this._$AH=n}}_$AC(t){let e=Gt.get(t.strings);return e===void 0&&Gt.set(t.strings,e=new B(t)),e}k(t){Et(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new o(this.O(z()),this.O(z()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){let n=this.strings,r=!1;if(n===void 0)t=T(this,t,e,0),r=!V(t)||t!==this._$AH&&t!==f,r&&(this._$AH=t);else{let a=t,c,l;for(t=n[0],c=0;c<n.length-1;c++)l=T(this,a[s+c],e,c),l===f&&(l=this._$AH[c]),r||=!V(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+n[c+1]),this._$AH[c]=l}r&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},st=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},ot=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},it=class extends P{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=T(this,t,e,0)??d)===f)return;let s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},nt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){T(this,t)}},Zt={M:gt,P:_,A:vt,C:1,L:Yt,R:et,D:Kt,V:T,I:U,H:P,N:ot,U:it,B:st,F:nt},Ne=yt.litHtmlPolyfillSupport;Ne?.(B,U),(yt.litHtmlVersions??=[]).push("3.3.1");var bt=(o,t,e)=>{let s=e?.renderBefore??t,i=s._$litPart$;if(i===void 0){let n=e?.renderBefore??null;s._$litPart$=i=new U(t.insertBefore(z(),n),n,void 0,e??{})}return i._$AI(o),i};var _t=globalThis,A=class extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=bt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};A._$litElement$=!0,A.finalized=!0,_t.litElementHydrateSupport?.({LitElement:A});var De=_t.litElementPolyfillSupport;De?.({LitElement:A});(_t.litElementVersions??=[]).push("4.2.1");var p=(o,t,...e)=>{try{return o?.call(t,...e)}catch(s){console.error(s,o)}},W=async(o,t,...e)=>{try{return await o?.call(t,...e)}catch(s){console.error(s,o)}};var q=Symbol.for("controller"),xe=o=>typeof o=="object"&&o!==null&&(q in o||"hostConnected"in o||"hostDisconnected"in o||"hostUpdate"in o||"hostUpdated"in o),Hs=o=>typeof o?.then=="function";var F,D=o=>{F!==o&&(F=o,queueMicrotask(()=>F===o?F=void 0:0))},G=o=>F,N=[],Xt=o=>{if(o===void 0){N=[];return}let t=N.indexOf(o);N=t===-1?[...N,o]:N.slice(0,t+1),queueMicrotask(()=>N=[])},te=()=>N,R,zs=o=>{R!==o&&(R=o,queueMicrotask(()=>R===o?R=void 0:0))},Le=()=>{let o=R;return R=void 0,o},ee=async(o,t)=>{let e=at(o);if(e===void 0)return o;if(await e.ready,typeof t=="function"){let s=e.watchExports(i=>t(i,s))}return e.exports},se=async o=>{let t=at(o);return await t.ready,t},at=o=>{let e=G().manager.X(o);if(e!==void 0)return e;if(xe(o))return o;let s=Le();if(s!==void 0)return s},rt=!1,Vs=o=>{rt=!0;try{return o()}finally{rt=!1}};var $=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}},oe=(o,t)=>{let e=t>Ue?Re:t/Me,s=0,i=setInterval(()=>{s+=e,s>=t&&(clearInterval(i),o())},e);return i},Ue=4e3,Re=2e3,Me=4;var Ie=(o,t,e)=>{let s=Object.keys(o),i=s.length;M===void 0&&queueMicrotask(K),M??=new Map;let n=M.get(o);return n===void 0&&(n={callbacks:[],keyCount:i},M.set(o,n)),n.keyCount!==i&&(n.callbacks.forEach(r=>r(s)),n.callbacks=[],n.keyCount=i),n.callbacks.push(r=>{let a=l=>p(t,null,l),c=r[i];c===void 0?a(void 0):o[c]===e?a(c):a(void 0)}),e},M,K=()=>{M?.forEach(({callbacks:o},t)=>{let e=Object.keys(t);o.forEach(s=>s(e))}),M=void 0},ke=(o,t,e)=>{let s=o.manager;return s.V!==d&&s.V!==e&&s.S(void 0,void 0),s.T.length===0&&queueMicrotask(()=>s.S(void 0,void 0)),s.V=e,s.T.push((i,n)=>p(t,void 0,e===n?i:void 0)),e},je=(o=[G(),...te()],t,e)=>{let s=Array.isArray(o)?o:[o],i=s.length+1,n=r=>{i-=1,r!==void 0&&(i=Math.min(i,0)),i===0&&t(r)};s.forEach(r=>Ie(r,a=>n(a===void 0?void 0:{key:a,host:r,isReactive:!1}),e));for(let r of s)if("manager"in r&&r.manager.component===r){ke(r,a=>n(a===void 0?void 0:{key:a,host:r,isReactive:!0}),e);break}return e},He=(o="",t={},e=G())=>{let s={emit:i=>{o===""&&K();let n=new CustomEvent(o,{detail:i,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(n),n}};return o===""&&je(void 0,i=>o=i.key,s),s},ze=He.bind(null,""),re;re=q;var At=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#o=[],this.#i=[],this.#c=[],this.#l=[],this.#p=[],this.#h=[],this.#d=!1,this.P=new $,this.connectedCalled=!1,this.loadedCalled=!1,this[re]=!0,this.#a=[];let e=this,s=t??G(new.target.name);e.#n=s,e.ready=e.P.promise,e.#r=ne(e),e.component=s,e.#n.addController(e),e.#n.manager===void 0||(Xt(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#o;#i;#c;#l;#p;#h;#d;#n;catchUpLifecycle(){let{manager:t}=this.#n;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#d&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(console.error)}#r;get exports(){return this.#r}set exports(t){let e=this.#r;e!==t&&(this.#r=t,this.#a.forEach(p),this.connectedCalled&&this.O!==!1&&this.#n.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#r=e?ne(t):t,this.#a.forEach(p)}#a;watchExports(t){let e=()=>t(this.#r);return this.#a.push(e),()=>void this.#a.splice(this.#a.indexOf(e),1)}get use(){return D(this.#n),ee}get useRef(){return D(this.#n),se}get useRefSync(){return D(this.#n),at}controllerRemoved(){this.#n.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#o.push(t)}onUpdate(t){this.#i.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#p.push(t),this.connectedCalled&&this.#n.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#h.forEach(p),t.#h=[]}async triggerLoad(){if(this.#d)return;this.#d=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#r)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#o.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#i.forEach(ie,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(ie,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#p.forEach(this.#u,this)}#u(t){D(this.#n);let e=p(t);(Array.isArray(e)?e:[e]).forEach(i=>{typeof i=="function"?this.#h.push(i):typeof i=="object"&&typeof i.remove=="function"&&this.#h.push(i.remove)})}};function ie(o){p(o,void 0,this)}var ae=At,ne=o=>{if(typeof o!="object"&&typeof o!="function"||o===null)return o;let t={get(s,i,n){if(!((i==="exports"||i==="_exports")&&i in s&&s[i]===e)&&(i in s||i in Promise.prototype||typeof i=="symbol"))return typeof s=="function"?s[i]:Reflect.get(s,i,n)}},e=new Proxy(o,t);return e};var m={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},E=o=>(...t)=>({_$litDirective$:o,values:t}),v=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:Ve}=Zt;var ct=o=>o.strings===void 0,ce=()=>document.createComment(""),Xs=(o,t,e)=>{let s=o._$AA.parentNode,i=t===void 0?o._$AB:t._$AA;if(e===void 0){let n=s.insertBefore(ce(),i),r=s.insertBefore(ce(),i);e=new Ve(n,r,o,o.options)}else{let n=e._$AB.nextSibling,r=e._$AM,a=r!==o;if(a){let c;e._$AQ?.(o),e._$AM=o,e._$AP!==void 0&&(c=o._$AU)!==r._$AU&&e._$AP(c)}if(n!==i||a){let c=e._$AA;for(;c!==n;){let l=c.nextSibling;s.insertBefore(c,i),c=l}}}return e},to=(o,t,e=o)=>(o._$AI(t,e),o),Be={},le=(o,t=Be)=>o._$AH=t,eo=o=>o._$AH,so=o=>{o._$AR(),o._$AA.remove()};var We=E(class extends v{constructor(o){if(super(o),o.type!==m.PROPERTY&&o.type!==m.ATTRIBUTE&&o.type!==m.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ct(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[t]){if(t===f||t===d)return t;let e=o.element,s=o.name;if(o.type===m.PROPERTY){if(t===e[s])return f}else if(o.type===m.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(s))return f}else if(o.type===m.ATTRIBUTE&&e.getAttribute(s)===t+"")return f;return le(o),t}});var J=(o,t)=>{let e=o._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),J(s,t);return!0},lt=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while(e?.size===0)},he=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),Ge(t)}};function Fe(o){this._$AN!==void 0?(lt(this),this._$AM=o,he(this)):this._$AM=o}function qe(o,t=!1,e=0){let s=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(s))for(let n=e;n<s.length;n++)J(s[n],!1),lt(s[n]);else s!=null&&(J(s,!1),lt(s));else J(this,o)}var Ge=o=>{o.type==m.CHILD&&(o._$AP??=qe,o._$AQ??=Fe)},ht=class extends v{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),he(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(J(this,t),lt(this))}setValue(t){if(ct(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var Eo=()=>new wt,wt=class{},Ct=new WeakMap,Ot=E(class extends ht{render(o){return d}update(o,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=o.options?.host,this.rt(this.ct=o.element)),d}rt(o){if(this.isConnected||(o=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=Ct.get(t);e===void 0&&(e=new WeakMap,Ct.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,o),o!==void 0&&this.G.call(this.ht,o)}else this.G.value=o}get lt(){return typeof this.G=="function"?Ct.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var dt=o=>o.replace(Je,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),Je=/[A-Z]+(?![a-z])|[A-Z]/gu;var xo="randomUUID"in crypto;var Pt=o=>{let t=o;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(o),(e.I??e._postLoad).promise}return!1},Nt={};function Dt(){}var Ze=(o,t)=>function(s,i){if(!globalThis.customElements)return;let r=(i??s??{}).resourcesUrl;r&&o.setAssetPath(r);for(let[a,[c,l=""]]of Object.entries(t)){if(customElements.get(a))continue;let[u,h,y]=l.split(";"),g=u?u?.split(",").map(Xe):void 0,C=g?.map(([L])=>L),x=class extends Tt{static{this.observedAttributes=g?.map(([,L])=>L).filter(L=>L!=="")}static{this.C=C}static{this.E=h?h?.split(","):void 0}static{this.D=y?.split(",")}static{this.L=a}static{this.K=o}constructor(){!x.B&&(x.B=c(),x.F()),super()}};customElements.define(a,x)}},pt=Object.defineProperty,Xe=o=>{let t=o.split(":");return t.length===1?[t[0],dt(t[0])]:t},ts=globalThis.HTMLElement??Dt,Tt=class extends ts{constructor(){super(),this.#e={},this.#s=[],this.I=new $,this.H=new $,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(s=>{Object.hasOwn(t,s)&&(t.#e[s]=t[s],delete t[s])}),e.A?t.#o({a:e.A}):e.B.then(async s=>{await e.K.p,t.#o(await(s.default?.then(i=>typeof i=="function"?{a:i}:i)??s))}).catch(s=>{t.H.reject(s),setTimeout(()=>{throw s})})}static{this.lumina=!0}static F(){for(let t of this.C??[])pt(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])pt(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])pt(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,s){this.#t?.attributeChangedCallback(t,e,s),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=Pt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#o(t){let e=this.constructor,s=e.L,i=this.#e,n=Object.values(t).find(h=>h.L===s),r=`${s}--lazy`,a=n;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);ss(a),!e.A&&(e.A=n,customElements.define(r,n)),n.N=this;let l=document.createElement(r);n.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(i).forEach(es,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function es([o,t]){this[o]=t}var ss=o=>{let t=o.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(i,n){e.setAttribute.call(this.el,i,n)},t.removeAttribute=function(i){e.removeAttribute.call(this.el,i)},pt(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var de=E(class extends v{constructor(o){if(super(o),o.type!==m.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter((t=>o[t])).join(" ")+" "}update(o,[t]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(let s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}let e=o.element.classList;for(let s of this.st)s in t||(e.remove(s),this.st.delete(s));for(let s in t){let i=!!t[s];i===this.st.has(s)||this.nt?.has(s)||(i?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return f}});var pe="important",os=" !"+pe,ue=E(class extends v{constructor(o){if(super(o),o.type!==m.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce(((t,e)=>{let s=o[e];return s==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(o,[t]){let{style:e}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?e.removeProperty(s):e[s]=null);for(let s in t){let i=t[s];if(i!=null){this.ft.add(s);let n=typeof i=="string"&&i.endsWith(os);s.includes("-")||n?e.setProperty(s,n?i.slice(0,-11):i,n?pe:""):e[s]=i}}return f}});var xt=class extends ae{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=Lt in t&&typeof t.destroy=="function",A.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${Lt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),K();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),D(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>void this.#e.destroy();this.#t=oe(t,ds)}}S(t,e){let s=this.T;this.V=d,this.T=[],s.forEach(i=>i(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},ds=1e3,Lt="autoDestroyDisabled",fe=class o extends A{constructor(){super(),this.M=[],this.manager=new xt(this);let t=this,e=t.constructor,s=e.N,i=e.K.o,n=o.prototype.shouldUpdate;t.#o=s?.H??new $,t.I=s?.I??new $,t.J=s?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=s??t,t.#s=t.enableUpdating,t.enableUpdating=Dt,t.shouldUpdate!==n&&(t.#e=t.shouldUpdate,t.shouldUpdate=n),i&&(t.#t=new Map,e.elementProperties.forEach((r,a)=>t.#t.set(a,i()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),s=this.shadowRootOptions===Nt;return this.K?.commonStyles===void 0||s?e:[this.K.commonStyles,...e]}static createProperty(t,e){let s=typeof e=="number"?e:Array.isArray(e)?e[0]:0,i=Array.isArray(e)?e[1]:void 0,n=i?.hasChanged??j,r={attribute:s&1&&typeof t=="string"?dt(t):!1,reflect:!!(s&2),type:s&4?Boolean:s&8?Number:void 0,state:!!(s&16),readOnly:!!(s&32),noAccessor:!!(s&64),c:!1,...i,hasChanged(a,c){let l=n(a,c);return r.c=l,l}};super.createProperty(t,r)}static getPropertyDescriptor(t,e,s){let i=this.K,n=super.getPropertyDescriptor(t,e,s);return s.d=n,{...n,get(){return i.t?.(this.#t.get(t)),n.get?.call(this)},set(r){let a=this.manager;if(s.readOnly&&!rt&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${r}"`);n.set.call(this,r??void 0),s.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(K(),a?.S(t,r))}}}static{this.lumina=!0}#t;#e;#s;#o;#i;connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;let t=this.constructor.K.c?.(()=>this.requestUpdate());this.#i=t;let e=!this.manager.connectedCalled;super.connectedCallback(),e?queueMicrotask(()=>this.#l().catch(s=>{this.#o.reject(s),setTimeout(()=>{throw s})})):t&&this.requestUpdate()}#c(t){try{this.#i.clear(),this.constructor.K.r(this.#i,()=>super.update(t))}catch(e){throw this.#i.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#i?.destroy(),this.#i=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,s=e.shadowRootOptions,n=t??(s===Nt?this.el:this.el.attachShadow(s));if(this.isConnected){let r=n.getRootNode();r.adoptedStyleSheets=[...r.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return n}async#l(){let t=this.el.G??Pt(this.el);t&&await t;let e=[];for(let i of this.M)"triggerLoad"in i?e.push(i.triggerLoad()):e.push(W(i.hostLoad,i));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(i=>i.has(Lt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await Promise.resolve();let s=this.J.filter(i=>!i.manager?.loadedCalled);s.length&&await Promise.allSettled(s.map(async i=>await i.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let i of this.M)"triggerLoaded"in i?i.triggerLoaded():p(i.hostLoaded,i);this.loaded?.(),this.#o.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#i?this.#c(t):super.update(t)}listen(t,e,s){let i=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,i,s),()=>this.el.removeEventListener(t,i,s)))}listenOn(t,e,s,i){let n=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)))}async componentOnReady(){return await this.#o.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var me=o=>{let t,e=i=>{t=new URL(i,globalThis.location?.href||void 0).href},s={...o,getAssetPath(i){let n=new URL(i,t);return n.origin!==globalThis.location?.origin?n.href:n.pathname},setAssetPath:e,customElement(i,n){n.K=s,n.L=i,customElements.get(i)||customElements.define(i,n)}};return e(o.defaultAssetPath),s};var $i=o=>typeof o=="object"&&o!=null?de(o):o,bi=o=>typeof o=="object"&&o!=null?ue(o):o;var Ut=class extends v{#t;#e;constructor(t){super(t);let e=this;this.#e=function(i){return e.#t.call(this,i)}}render(t){return typeof t=="function"?(this.#t=t,Ot(this.#e)):Ot(t)}},_i=E(Ut);var Ai=d;function Ci(o,t,e){e==null?o.removeAttribute(t):o.setAttribute(t,e)}var wi={toAttribute:o=>o===!0?"":o===!1?null:o};var ve="calcite-mode-auto",Ee="calcite-mode-dark",ps="calcite-mode-light",Ni={autoMode:ve,darkMode:Ee,lightMode:ps,rtl:"calcite--rtl",calciteAnimate:"calcite-animate",calciteAnimateInUp:"calcite-animate__in-up",calciteAnimateInDown:"calcite-animate__in-down",calciteAnimateInRight:"calcite-animate__in-right",calciteAnimateInLeft:"calcite-animate__in-left"},Di={filter:250,nextTick:0,resize:150,reposition:100},xi=10,Li=25;function ye(){let{classList:o}=document.body,t=window.matchMedia("(prefers-color-scheme: dark)").matches,e=()=>o.contains(Ee)||o.contains(ve)&&t?"dark":"light",s=r=>document.body.dispatchEvent(new CustomEvent("calciteModeChange",{bubbles:!0,detail:{mode:r}})),i=r=>{n!==r&&s(r),n=r},n=e();s(n),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r=>i(r.matches?"dark":"light")),new MutationObserver(()=>i(e())).observe(document.body,{attributes:!0,attributeFilter:["class"]})}var Mt,us={focusTrapStack:[],logLevel:"info"};function fs(){return{...us,...globalThis.calciteConfig??{}}}function ms(){return Mt||(Mt=fs()),Mt}var ge="5.0.0-next.2",ys="2025-11-12",gs="5a896ba6b";function vs(){let o=ms();o&&o.version||(console.info(`Using Calcite Components ${ge} [Date: ${ys}, Revision: ${gs}]`),Object.defineProperty(o,"version",{value:ge,writable:!1}),globalThis.calciteConfig=o)}document.readyState==="interactive"?ye():document.addEventListener("DOMContentLoaded",ye,{once:!0});queueMicrotask(vs);var Es=me({defaultAssetPath:"https://cdn.jsdelivr.net/npm/@esri/calcite-components@5.0.0-next.2/dist/calcite/",hydratedAttribute:"calcite-hydrated"}),{customElement:Ui,getAssetPath:Ri,setAssetPath:Mi}=Es;export{Hs as a,D as b,Xt as c,te as d,zs as e,Vs as f,$e as g,Cs as h,ws as i,Os as j,f as k,d as l,bt as m,je as n,ze as o,At as p,ae as q,Ze as r,m as s,E as t,v as u,Xs as v,to as w,le as x,eo as y,so as z,We as A,Eo as B,Ot as C,fe as D,$i as E,bi as F,Ai as G,Ci as H,wi as I,Ni as J,Di as K,xi as L,Li as M,ms as N,Es as O,Ui as P,Ri as Q};
|
|
6
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ft=/'/g,qt=/"/g,Jt=/^(?:script|style|textarea|title)$/i,$t=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),Cs=$t(1),ws=$t(2),Os=$t(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Gt=new WeakMap,O=S.createTreeWalker(S,129);function Qt(o,t){if(!Et(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vt!==void 0?Vt.createHTML(t):t}var Yt=(o,t)=>{let e=o.length-1,s=[],i,n=t===2?"<svg>":t===3?"<math>":"",r=H;for(let a=0;a<e;a++){let c=o[a],l,u,h=-1,y=0;for(;y<c.length&&(r.lastIndex=y,u=r.exec(c),u!==null);)y=r.lastIndex,r===H?u[1]==="!--"?r=Bt:u[1]!==void 0?r=Wt:u[2]!==void 0?(Jt.test(u[2])&&(i=RegExp("</"+u[2],"g")),r=w):u[3]!==void 0&&(r=w):r===w?u[0]===">"?(r=i??H,h=-1):u[1]===void 0?h=-2:(h=r.lastIndex-u[2].length,l=u[1],r=u[3]===void 0?w:u[3]==='"'?qt:Ft):r===qt||r===Ft?r=w:r===Bt||r===Wt?r=H:(r=w,i=void 0);let g=r===w&&o[a+1].startsWith("/>")?" ":"";n+=r===H?c+Pe:h>=0?(s.push(l),c.slice(0,h)+gt+c.slice(h)+_+g):c+_+(h===-2?a:g)}return[Qt(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},B=class o{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0,a=t.length-1,c=this.parts,[l,u]=Yt(t,e);if(this.el=o.createElement(l,s),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=O.nextNode())!==null&&c.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith(gt)){let y=u[r++],g=i.getAttribute(h).split(_),C=/([.?@])?(.*)/.exec(y);c.push({type:1,index:n,name:C[2],strings:g,ctor:C[1]==="."?st:C[1]==="?"?ot:C[1]==="@"?it:P}),i.removeAttribute(h)}else h.startsWith(_)&&(c.push({type:6,index:n}),i.removeAttribute(h));if(Jt.test(i.tagName)){let h=i.textContent.split(_),y=h.length-1;if(y>0){i.textContent=tt?tt.emptyScript:"";for(let g=0;g<y;g++)i.append(h[g],z()),O.nextNode(),c.push({type:2,index:++n});i.append(h[y],z())}}}else if(i.nodeType===8)if(i.data===vt)c.push({type:2,index:n});else{let h=-1;for(;(h=i.data.indexOf(_,h+1))!==-1;)c.push({type:7,index:n}),h+=_.length-1}n++}}static createElement(t,e){let s=S.createElement("template");return s.innerHTML=t,s}};function T(o,t,e=o,s){if(t===f)return t;let i=s!==void 0?e._$Co?.[s]:e._$Cl,n=V(t)?void 0:t._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,s)),s!==void 0?(e._$Co??=[])[s]=i:e._$Cl=i),i!==void 0&&(t=T(o,i._$AS(o,t.values),i,s)),t}var et=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??S).importNode(e,!0);O.currentNode=i;let n=O.nextNode(),r=0,a=0,c=s[0];for(;c!==void 0;){if(r===c.index){let l;c.type===2?l=new U(n,n.nextSibling,this,t):c.type===1?l=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(l=new nt(n,this,t)),this._$AV.push(l),c=s[++a]}r!==c?.index&&(n=O.nextNode(),r++)}return O.currentNode=S,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},U=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=T(this,t,e),V(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Kt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=B.createElement(Qt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{let n=new et(i,this),r=n.u(this.options);n.p(e),this.T(r),this._$AH=n}}_$AC(t){let e=Gt.get(t.strings);return e===void 0&&Gt.set(t.strings,e=new B(t)),e}k(t){Et(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new o(this.O(z()),this.O(z()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){let n=this.strings,r=!1;if(n===void 0)t=T(this,t,e,0),r=!V(t)||t!==this._$AH&&t!==f,r&&(this._$AH=t);else{let a=t,c,l;for(t=n[0],c=0;c<n.length-1;c++)l=T(this,a[s+c],e,c),l===f&&(l=this._$AH[c]),r||=!V(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+n[c+1]),this._$AH[c]=l}r&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},st=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},ot=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},it=class extends P{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=T(this,t,e,0)??d)===f)return;let s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},nt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){T(this,t)}},Zt={M:gt,P:_,A:vt,C:1,L:Yt,R:et,D:Kt,V:T,I:U,H:P,N:ot,U:it,B:st,F:nt},Ne=yt.litHtmlPolyfillSupport;Ne?.(B,U),(yt.litHtmlVersions??=[]).push("3.3.1");var bt=(o,t,e)=>{let s=e?.renderBefore??t,i=s._$litPart$;if(i===void 0){let n=e?.renderBefore??null;s._$litPart$=i=new U(t.insertBefore(z(),n),n,void 0,e??{})}return i._$AI(o),i};var _t=globalThis,A=class extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=bt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};A._$litElement$=!0,A.finalized=!0,_t.litElementHydrateSupport?.({LitElement:A});var De=_t.litElementPolyfillSupport;De?.({LitElement:A});(_t.litElementVersions??=[]).push("4.2.1");var p=(o,t,...e)=>{try{return o?.call(t,...e)}catch(s){console.error(s,o)}},W=async(o,t,...e)=>{try{return await o?.call(t,...e)}catch(s){console.error(s,o)}};var q=Symbol.for("controller"),xe=o=>typeof o=="object"&&o!==null&&(q in o||"hostConnected"in o||"hostDisconnected"in o||"hostUpdate"in o||"hostUpdated"in o),Hs=o=>typeof o?.then=="function";var F,D=o=>{F!==o&&(F=o,queueMicrotask(()=>F===o?F=void 0:0))},G=o=>F,N=[],Xt=o=>{if(o===void 0){N=[];return}let t=N.indexOf(o);N=t===-1?[...N,o]:N.slice(0,t+1),queueMicrotask(()=>N=[])},te=()=>N,R,zs=o=>{R!==o&&(R=o,queueMicrotask(()=>R===o?R=void 0:0))},Le=()=>{let o=R;return R=void 0,o},ee=async(o,t)=>{let e=at(o);if(e===void 0)return o;if(await e.ready,typeof t=="function"){let s=e.watchExports(i=>t(i,s))}return e.exports},se=async o=>{let t=at(o);return await t.ready,t},at=o=>{let e=G().manager.X(o);if(e!==void 0)return e;if(xe(o))return o;let s=Le();if(s!==void 0)return s},rt=!1,Vs=o=>{rt=!0;try{return o()}finally{rt=!1}};var $=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}},oe=(o,t)=>{let e=t>Ue?Re:t/Me,s=0,i=setInterval(()=>{s+=e,s>=t&&(clearInterval(i),o())},e);return i},Ue=4e3,Re=2e3,Me=4;var Ie=(o,t,e)=>{let s=Object.keys(o),i=s.length;M===void 0&&queueMicrotask(K),M??=new Map;let n=M.get(o);return n===void 0&&(n={callbacks:[],keyCount:i},M.set(o,n)),n.keyCount!==i&&(n.callbacks.forEach(r=>r(s)),n.callbacks=[],n.keyCount=i),n.callbacks.push(r=>{let a=l=>p(t,null,l),c=r[i];c===void 0?a(void 0):o[c]===e?a(c):a(void 0)}),e},M,K=()=>{M?.forEach(({callbacks:o},t)=>{let e=Object.keys(t);o.forEach(s=>s(e))}),M=void 0},ke=(o,t,e)=>{let s=o.manager;return s.V!==d&&s.V!==e&&s.S(void 0,void 0),s.T.length===0&&queueMicrotask(()=>s.S(void 0,void 0)),s.V=e,s.T.push((i,n)=>p(t,void 0,e===n?i:void 0)),e},je=(o=[G(),...te()],t,e)=>{let s=Array.isArray(o)?o:[o],i=s.length+1,n=r=>{i-=1,r!==void 0&&(i=Math.min(i,0)),i===0&&t(r)};s.forEach(r=>Ie(r,a=>n(a===void 0?void 0:{key:a,host:r,isReactive:!1}),e));for(let r of s)if("manager"in r&&r.manager.component===r){ke(r,a=>n(a===void 0?void 0:{key:a,host:r,isReactive:!0}),e);break}return e},He=(o="",t={},e=G())=>{let s={emit:i=>{o===""&&K();let n=new CustomEvent(o,{detail:i,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(n),n}};return o===""&&je(void 0,i=>o=i.key,s),s},ze=He.bind(null,""),re;re=q;var At=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#o=[],this.#i=[],this.#c=[],this.#l=[],this.#p=[],this.#h=[],this.#d=!1,this.P=new $,this.connectedCalled=!1,this.loadedCalled=!1,this[re]=!0,this.#a=[];let e=this,s=t??G(new.target.name);e.#n=s,e.ready=e.P.promise,e.#r=ne(e),e.component=s,e.#n.addController(e),e.#n.manager===void 0||(Xt(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#o;#i;#c;#l;#p;#h;#d;#n;catchUpLifecycle(){let{manager:t}=this.#n;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#d&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(console.error)}#r;get exports(){return this.#r}set exports(t){let e=this.#r;e!==t&&(this.#r=t,this.#a.forEach(p),this.connectedCalled&&this.O!==!1&&this.#n.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#r=e?ne(t):t,this.#a.forEach(p)}#a;watchExports(t){let e=()=>t(this.#r);return this.#a.push(e),()=>void this.#a.splice(this.#a.indexOf(e),1)}get use(){return D(this.#n),ee}get useRef(){return D(this.#n),se}get useRefSync(){return D(this.#n),at}controllerRemoved(){this.#n.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#o.push(t)}onUpdate(t){this.#i.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#p.push(t),this.connectedCalled&&this.#n.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#h.forEach(p),t.#h=[]}async triggerLoad(){if(this.#d)return;this.#d=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#r)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#o.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#i.forEach(ie,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(ie,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#p.forEach(this.#u,this)}#u(t){D(this.#n);let e=p(t);(Array.isArray(e)?e:[e]).forEach(i=>{typeof i=="function"?this.#h.push(i):typeof i=="object"&&typeof i.remove=="function"&&this.#h.push(i.remove)})}};function ie(o){p(o,void 0,this)}var ae=At,ne=o=>{if(typeof o!="object"&&typeof o!="function"||o===null)return o;let t={get(s,i,n){if(!((i==="exports"||i==="_exports")&&i in s&&s[i]===e)&&(i in s||i in Promise.prototype||typeof i=="symbol"))return typeof s=="function"?s[i]:Reflect.get(s,i,n)}},e=new Proxy(o,t);return e};var m={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},E=o=>(...t)=>({_$litDirective$:o,values:t}),v=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:Ve}=Zt;var ct=o=>o.strings===void 0,ce=()=>document.createComment(""),Xs=(o,t,e)=>{let s=o._$AA.parentNode,i=t===void 0?o._$AB:t._$AA;if(e===void 0){let n=s.insertBefore(ce(),i),r=s.insertBefore(ce(),i);e=new Ve(n,r,o,o.options)}else{let n=e._$AB.nextSibling,r=e._$AM,a=r!==o;if(a){let c;e._$AQ?.(o),e._$AM=o,e._$AP!==void 0&&(c=o._$AU)!==r._$AU&&e._$AP(c)}if(n!==i||a){let c=e._$AA;for(;c!==n;){let l=c.nextSibling;s.insertBefore(c,i),c=l}}}return e},to=(o,t,e=o)=>(o._$AI(t,e),o),Be={},le=(o,t=Be)=>o._$AH=t,eo=o=>o._$AH,so=o=>{o._$AR(),o._$AA.remove()};var We=E(class extends v{constructor(o){if(super(o),o.type!==m.PROPERTY&&o.type!==m.ATTRIBUTE&&o.type!==m.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ct(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[t]){if(t===f||t===d)return t;let e=o.element,s=o.name;if(o.type===m.PROPERTY){if(t===e[s])return f}else if(o.type===m.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(s))return f}else if(o.type===m.ATTRIBUTE&&e.getAttribute(s)===t+"")return f;return le(o),t}});var J=(o,t)=>{let e=o._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),J(s,t);return!0},lt=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while(e?.size===0)},he=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),Ge(t)}};function Fe(o){this._$AN!==void 0?(lt(this),this._$AM=o,he(this)):this._$AM=o}function qe(o,t=!1,e=0){let s=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(s))for(let n=e;n<s.length;n++)J(s[n],!1),lt(s[n]);else s!=null&&(J(s,!1),lt(s));else J(this,o)}var Ge=o=>{o.type==m.CHILD&&(o._$AP??=qe,o._$AQ??=Fe)},ht=class extends v{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),he(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(J(this,t),lt(this))}setValue(t){if(ct(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var Eo=()=>new wt,wt=class{},Ct=new WeakMap,Ot=E(class extends ht{render(o){return d}update(o,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=o.options?.host,this.rt(this.ct=o.element)),d}rt(o){if(this.isConnected||(o=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=Ct.get(t);e===void 0&&(e=new WeakMap,Ct.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,o),o!==void 0&&this.G.call(this.ht,o)}else this.G.value=o}get lt(){return typeof this.G=="function"?Ct.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var dt=o=>o.replace(Je,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),Je=/[A-Z]+(?![a-z])|[A-Z]/gu;var xo="randomUUID"in crypto;var Pt=o=>{let t=o;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(o),(e.I??e._postLoad).promise}return!1},Nt={};function Dt(){}var Ze=(o,t)=>function(s,i){if(!globalThis.customElements)return;let r=(i??s??{}).resourcesUrl;r&&o.setAssetPath(r);for(let[a,[c,l=""]]of Object.entries(t)){if(customElements.get(a))continue;let[u,h,y]=l.split(";"),g=u?u?.split(",").map(Xe):void 0,C=g?.map(([L])=>L),x=class extends Tt{static{this.observedAttributes=g?.map(([,L])=>L).filter(L=>L!=="")}static{this.C=C}static{this.E=h?h?.split(","):void 0}static{this.D=y?.split(",")}static{this.L=a}static{this.K=o}constructor(){!x.B&&(x.B=c(),x.F()),super()}};customElements.define(a,x)}},pt=Object.defineProperty,Xe=o=>{let t=o.split(":");return t.length===1?[t[0],dt(t[0])]:t},ts=globalThis.HTMLElement??Dt,Tt=class extends ts{constructor(){super(),this.#e={},this.#s=[],this.I=new $,this.H=new $,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(s=>{Object.hasOwn(t,s)&&(t.#e[s]=t[s],delete t[s])}),e.A?t.#o({a:e.A}):e.B.then(async s=>{await e.K.p,t.#o(await(s.default?.then(i=>typeof i=="function"?{a:i}:i)??s))}).catch(s=>{t.H.reject(s),setTimeout(()=>{throw s})})}static{this.lumina=!0}static F(){for(let t of this.C??[])pt(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])pt(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])pt(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,s){this.#t?.attributeChangedCallback(t,e,s),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=Pt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#o(t){let e=this.constructor,s=e.L,i=this.#e,n=Object.values(t).find(h=>h.L===s),r=`${s}--lazy`,a=n;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);ss(a),!e.A&&(e.A=n,customElements.define(r,n)),n.N=this;let l=document.createElement(r);n.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(i).forEach(es,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function es([o,t]){this[o]=t}var ss=o=>{let t=o.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(i,n){e.setAttribute.call(this.el,i,n)},t.removeAttribute=function(i){e.removeAttribute.call(this.el,i)},pt(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var de=E(class extends v{constructor(o){if(super(o),o.type!==m.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter((t=>o[t])).join(" ")+" "}update(o,[t]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(let s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}let e=o.element.classList;for(let s of this.st)s in t||(e.remove(s),this.st.delete(s));for(let s in t){let i=!!t[s];i===this.st.has(s)||this.nt?.has(s)||(i?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return f}});var pe="important",os=" !"+pe,ue=E(class extends v{constructor(o){if(super(o),o.type!==m.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce(((t,e)=>{let s=o[e];return s==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(o,[t]){let{style:e}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?e.removeProperty(s):e[s]=null);for(let s in t){let i=t[s];if(i!=null){this.ft.add(s);let n=typeof i=="string"&&i.endsWith(os);s.includes("-")||n?e.setProperty(s,n?i.slice(0,-11):i,n?pe:""):e[s]=i}}return f}});var xt=class extends ae{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=Lt in t&&typeof t.destroy=="function",A.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${Lt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),K();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),D(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>void this.#e.destroy();this.#t=oe(t,ds)}}S(t,e){let s=this.T;this.V=d,this.T=[],s.forEach(i=>i(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},ds=1e3,Lt="autoDestroyDisabled",fe=class o extends A{constructor(){super(),this.M=[],this.manager=new xt(this);let t=this,e=t.constructor,s=e.N,i=e.K.o,n=o.prototype.shouldUpdate;t.#o=s?.H??new $,t.I=s?.I??new $,t.J=s?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=s??t,t.#s=t.enableUpdating,t.enableUpdating=Dt,t.shouldUpdate!==n&&(t.#e=t.shouldUpdate,t.shouldUpdate=n),i&&(t.#t=new Map,e.elementProperties.forEach((r,a)=>t.#t.set(a,i()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),s=this.shadowRootOptions===Nt;return this.K?.commonStyles===void 0||s?e:[this.K.commonStyles,...e]}static createProperty(t,e){let s=typeof e=="number"?e:Array.isArray(e)?e[0]:0,i=Array.isArray(e)?e[1]:void 0,n=i?.hasChanged??j,r={attribute:s&1&&typeof t=="string"?dt(t):!1,reflect:!!(s&2),type:s&4?Boolean:s&8?Number:void 0,state:!!(s&16),readOnly:!!(s&32),noAccessor:!!(s&64),c:!1,...i,hasChanged(a,c){let l=n(a,c);return r.c=l,l}};super.createProperty(t,r)}static getPropertyDescriptor(t,e,s){let i=this.K,n=super.getPropertyDescriptor(t,e,s);return s.d=n,{...n,get(){return i.t?.(this.#t.get(t)),n.get?.call(this)},set(r){let a=this.manager;if(s.readOnly&&!rt&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${r}"`);n.set.call(this,r??void 0),s.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(K(),a?.S(t,r))}}}static{this.lumina=!0}#t;#e;#s;#o;#i;connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;let t=this.constructor.K.c?.(()=>this.requestUpdate());this.#i=t;let e=!this.manager.connectedCalled;super.connectedCallback(),e?queueMicrotask(()=>this.#l().catch(s=>{this.#o.reject(s),setTimeout(()=>{throw s})})):t&&this.requestUpdate()}#c(t){try{this.#i.clear(),this.constructor.K.r(this.#i,()=>super.update(t))}catch(e){throw this.#i.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#i?.destroy(),this.#i=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,s=e.shadowRootOptions,n=t??(s===Nt?this.el:this.el.attachShadow(s));if(this.isConnected){let r=n.getRootNode();r.adoptedStyleSheets=[...r.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return n}async#l(){let t=this.el.G??Pt(this.el);t&&await t;let e=[];for(let i of this.M)"triggerLoad"in i?e.push(i.triggerLoad()):e.push(W(i.hostLoad,i));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(i=>i.has(Lt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await Promise.resolve();let s=this.J.filter(i=>!i.manager?.loadedCalled);s.length&&await Promise.allSettled(s.map(async i=>await i.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let i of this.M)"triggerLoaded"in i?i.triggerLoaded():p(i.hostLoaded,i);this.loaded?.(),this.#o.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#i?this.#c(t):super.update(t)}listen(t,e,s){let i=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,i,s),()=>this.el.removeEventListener(t,i,s)))}listenOn(t,e,s,i){let n=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)))}async componentOnReady(){return await this.#o.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var me=o=>{let t,e=i=>{t=new URL(i,globalThis.location?.href||void 0).href},s={...o,getAssetPath(i){let n=new URL(i,t);return n.origin!==globalThis.location?.origin?n.href:n.pathname},setAssetPath:e,customElement(i,n){n.K=s,n.L=i,customElements.get(i)||customElements.define(i,n)}};return e(o.defaultAssetPath),s};var $i=o=>typeof o=="object"&&o!=null?de(o):o,bi=o=>typeof o=="object"&&o!=null?ue(o):o;var Ut=class extends v{#t;#e;constructor(t){super(t);let e=this;this.#e=function(i){return e.#t.call(this,i)}}render(t){return typeof t=="function"?(this.#t=t,Ot(this.#e)):Ot(t)}},_i=E(Ut);var Ai=d;function Ci(o,t,e){e==null?o.removeAttribute(t):o.setAttribute(t,e)}var wi={toAttribute:o=>o===!0?"":o===!1?null:o};var ve="calcite-mode-auto",Ee="calcite-mode-dark",ps="calcite-mode-light",Ni={autoMode:ve,darkMode:Ee,lightMode:ps,rtl:"calcite--rtl",calciteAnimate:"calcite-animate",calciteAnimateInUp:"calcite-animate__in-up",calciteAnimateInDown:"calcite-animate__in-down",calciteAnimateInRight:"calcite-animate__in-right",calciteAnimateInLeft:"calcite-animate__in-left"},Di={filter:250,nextTick:0,resize:150,reposition:100},xi=10,Li=25;function ye(){let{classList:o}=document.body,t=window.matchMedia("(prefers-color-scheme: dark)").matches,e=()=>o.contains(Ee)||o.contains(ve)&&t?"dark":"light",s=r=>document.body.dispatchEvent(new CustomEvent("calciteModeChange",{bubbles:!0,detail:{mode:r}})),i=r=>{n!==r&&s(r),n=r},n=e();s(n),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r=>i(r.matches?"dark":"light")),new MutationObserver(()=>i(e())).observe(document.body,{attributes:!0,attributeFilter:["class"]})}var Mt,us={focusTrapStack:[],logLevel:"info"};function fs(){return{...us,...globalThis.calciteConfig??{}}}function ms(){return Mt||(Mt=fs()),Mt}var ge="5.0.0-next.3",ys="2025-11-17",gs="86739e53e";function vs(){let o=ms();o&&o.version||(console.info(`Using Calcite Components ${ge} [Date: ${ys}, Revision: ${gs}]`),Object.defineProperty(o,"version",{value:ge,writable:!1}),globalThis.calciteConfig=o)}document.readyState==="interactive"?ye():document.addEventListener("DOMContentLoaded",ye,{once:!0});queueMicrotask(vs);var Es=me({defaultAssetPath:"https://cdn.jsdelivr.net/npm/@esri/calcite-components@5.0.0-next.3/dist/calcite/",hydratedAttribute:"calcite-hydrated"}),{customElement:Ui,getAssetPath:Ri,setAssetPath:Mi}=Es;export{Hs as a,D as b,Xt as c,te as d,zs as e,Vs as f,$e as g,Cs as h,ws as i,Os as j,f as k,d as l,bt as m,je as n,ze as o,At as p,ae as q,Ze as r,m as s,E as t,v as u,Xs as v,to as w,le as x,eo as y,so as z,We as A,Eo as B,Ot as C,fe as D,$i as E,bi as F,Ai as G,Ci as H,wi as I,Ni as J,Di as K,xi as L,Li as M,ms as N,Es as O,Ui as P,Ri as Q};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as b,e as g}from"./
|
|
3
|
+
v5.0.0-next.3 */
|
|
4
|
+
import{a as b,e as g}from"./TKNM6PGC.js";import"./7STMP4B2.js";import"./SLICSH62.js";import{a as p}from"./DNM3U3Z7.js";import{D as s,E as t,F as e,G as c,P as m,g as r,h as a}from"./ALOAVLGK.js";var i={firstTitle:"first-title",list:"list",label:"label",separator:"separator",title:"title",scale:l=>`scale--${l}`},x=r`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-horizontal-spacing-unit: var(--calcite-spacing-sm);--calcite-combobox-item-vertical-spacing-unit: var(--calcite-spacing-xxs)}.scale--s .first-title{padding-block-start:var(--calcite-spacing-sm)}.scale--s .separator{margin-block:var(--calcite-combobox-item-vertical-spacing-unit);margin-inline-start:calc(var(--calcite-combobox-item-horizontal-spacing-unit) + var(--calcite-combobox-item-horizontal-spacing-unit) * var(--calcite-combobox-item-spacing-indent-multiplier));margin-inline-end:var(--calcite-combobox-item-horizontal-spacing-unit)}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-horizontal-spacing-unit: var(--calcite-spacing-md);--calcite-combobox-item-vertical-spacing-unit: var(--calcite-spacing-xs)}.scale--m .first-title{padding-block-start:var(--calcite-spacing-md)}.scale--m .separator{margin-block:var(--calcite-combobox-item-vertical-spacing-unit);margin-inline-start:calc(var(--calcite-combobox-item-horizontal-spacing-unit) + var(--calcite-combobox-item-horizontal-spacing-unit) * var(--calcite-combobox-item-spacing-indent-multiplier));margin-inline-end:var(--calcite-combobox-item-horizontal-spacing-unit)}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-horizontal-spacing-unit: var(--calcite-spacing-lg);--calcite-combobox-item-vertical-spacing-unit: var(--calcite-spacing-sm-plus)}.scale--l .first-title{padding-block-start:var(--calcite-spacing-xl)}.scale--l .separator{margin-block:var(--calcite-combobox-item-vertical-spacing-unit);margin-inline-start:calc(var(--calcite-combobox-item-horizontal-spacing-unit) + var(--calcite-combobox-item-horizontal-spacing-unit) * var(--calcite-combobox-item-spacing-indent-multiplier));margin-inline-end:var(--calcite-combobox-item-horizontal-spacing-unit)}:host,.list{margin:0;display:flex;flex-direction:column;padding:0}:host(:focus),.list:focus{outline:2px solid transparent;outline-offset:2px}.separator{block-size:var(--calcite-spacing-px);background-color:var(--calcite-combobox-item-group-border-color, var(--calcite-color-border-3))}.label{box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:0px;max-inline-size:100%}.title{--calcite-combobox-item-indent-value: calc( var(--calcite-combobox-item-horizontal-spacing-unit) * var(--calcite-combobox-item-spacing-indent-multiplier) );border:0 solid;display:block;flex:1 1 0%;font-weight:var(--calcite-font-weight-bold);word-wrap:break-word;word-break:break-word;padding-block:var(--calcite-combobox-item-vertical-spacing-unit);padding-inline-start:calc(var(--calcite-combobox-item-indent-value) + var(--calcite-combobox-item-horizontal-spacing-unit));padding-inline-end:var(--calcite-combobox-item-horizontal-spacing-unit);color:var(--calcite-combobox-item-group-text-color, var(--calcite-color-text-1))}:host([hidden]){display:none}[hidden]{display:none}:host([item-hidden]){display:none}`,o=class extends s{constructor(){super(...arguments),this.guid=p(),this.afterEmptyGroup=!1,this.position=0,this.scale="m",this.itemHidden=!1}static{this.properties={afterEmptyGroup:[7,{},{reflect:!0,type:Boolean}],ancestors:[0,{},{attribute:!1}],label:1,position:[9,{},{type:Number}],scale:1,itemHidden:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=x}connectedCallback(){super.connectedCallback(),this.ancestors=b(this.el)}render(){let{el:d,scale:u}=this,n=g(d),v=this.position>0?a`<div class=${t(i.separator)} role=separator style=${e({"--calcite-combobox-item-spacing-indent-multiplier":`${n}`})}></div>`:null;return a`<ul aria-labelledby=${this.guid??c} class=${t({[i.list]:!0,[i.scale(u)]:!0})} role=group>${v}<li class=${t({[i.label]:!0})} id=${this.guid??c} role=presentation style=${e({"--calcite-combobox-item-spacing-indent-multiplier":`${n}`})}><span class=${t({[i.title]:!0,[i.firstTitle]:this.position===0})}>${this.label}</span></li><slot></slot></ul>`}};m("calcite-combobox-item-group",o);export{o as ComboboxItemGroup};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{p as m,w as z}from"./
|
|
3
|
+
v5.0.0-next.3 */
|
|
4
|
+
import{p as m,w as z}from"./HXF4YIAH.js";import"./3GUK3G7C.js";import{d as k}from"./SLICSH62.js";import"./DNM3U3Z7.js";import{D as g,E as c,F as p,G as h,P as v,g as b,h as o}from"./ALOAVLGK.js";var u={thumbnail:"thumbnail",background:"background",initials:"initials",icon:"icon"};function x(a){a=$(a);let e=0;for(let i=0;i<a.length;i++)e=a.charCodeAt(i)+((e<<5)-e);let t="#";for(let i=0;i<3;i++){let r=e>>i*8&255;t+=("00"+r.toString(16)).substr(-2)}return t}function $(a){let e=Math.floor(a.length/2),t=a.split("").reverse().join("");return t.substring(e)+t.slice(0,e)}function y(a){let{r:e,g:t,b:i}=a;e/=255,t/=255,i/=255;let r=Math.max(e,t,i),l=Math.min(e,t,i),s=r-l;if(r===l)return 0;let n=(r+l)/2;switch(r){case e:n=(t-i)/s+(t<i?6:0);break;case t:n=(i-e)/s+2;break;case i:n=(e-t)/s+4;break}return Math.round(n*60)}function C(a){return y(z(a))}var T=b`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:inline-block;overflow:hidden;border-radius:var(--calcite-avatar-corner-radius, 50%);color:var(--calcite-avatar-color, var(--calcite-color-text-2))}:host([scale=s]){block-size:1.5rem;inline-size:1.5rem;font-size:var(--calcite-font-size--3)}:host([scale=m]){block-size:2rem;inline-size:2rem;font-size:var(--calcite-font-size--2)}:host([scale=l]){block-size:2.75rem;inline-size:2.75rem;font-size:var(--calcite-font-size-0)}.icon{display:flex}.background{display:flex;block-size:100%;inline-size:100%;align-items:center;justify-content:center;border-radius:var(--calcite-avatar-corner-radius, 50%)}.initials{font-weight:var(--calcite-font-weight-bold);text-transform:uppercase}.thumbnail{block-size:100%;inline-size:100%;border-radius:var(--calcite-avatar-corner-radius, 50%)}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends g{constructor(){super(...arguments),this.thumbnailFailedToLoad=!1,this.scale="m"}static{this.properties={thumbnailFailedToLoad:[16,{},{state:!0}],fullName:[3,{},{reflect:!0}],label:1,scale:[3,{},{reflect:!0}],thumbnail:[3,{},{reflect:!0}],userId:[3,{},{reflect:!0}],username:[3,{},{reflect:!0}]}}static{this.styles=T}determineContent(){if(this.thumbnail&&!this.thumbnailFailedToLoad)return o`<img alt=${(this.label||"")??h} class=${c(u.thumbnail)} @error=${()=>this.thumbnailFailedToLoad=!0} src=${this.thumbnail??h}>`;let e=this.generateInitials(),t=this.generateFillColor();return o`<span .ariaLabel=${this.label||this.fullName} class=${c(u.background)} role=figure style=${p({backgroundColor:t})}>${e?o`<span aria-hidden=true class=${c(u.initials)}>${e}</span>`:o`<calcite-icon class=${c(u.icon)} icon=user .scale=${this.scale}></calcite-icon>`}</span>`}generateFillColor(){let{userId:e,username:t,fullName:i,el:r}=this,l=k(r),s=e&&`#${e.substr(e.length-6)}`,n=t||i||"",f=s&&m(s)?s:x(n);return!e&&!n||!m(f)?"var(--calcite-avatar-background-color, var(--calcite-color-foreground-2))":`var(--calcite-avatar-background-color, hsl(${C(f)}, 60%, ${l==="dark"?20:90}%))`}generateInitials(){let{fullName:e,username:t}=this;return e?e.trim().split(" ").map(i=>i.substring(0,1)).join(""):t?t.substring(0,2):!1}render(){return this.determineContent()}};v("calcite-avatar",d);export{d as Avatar};
|