@tylertech/forge 3.0.0-next.11 → 3.0.0-next.12
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/custom-elements.json +36275 -28495
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/menu-button/index.js +1 -1
- package/dist/esm/app-bar/notification-button/index.js +1 -1
- package/dist/esm/app-bar/profile-button/index.js +1 -1
- package/dist/esm/app-bar/search/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/avatar/index.js +1 -1
- package/dist/esm/backdrop/index.js +1 -1
- package/dist/esm/badge/index.js +1 -1
- package/dist/esm/banner/index.js +1 -1
- package/dist/esm/bottom-sheet/index.js +1 -1
- package/dist/esm/busy-indicator/index.js +1 -1
- package/dist/esm/button/index.js +1 -1
- package/dist/esm/button-area/index.js +7 -0
- package/dist/esm/button-area/index.js.map +7 -0
- package/dist/esm/button-toggle/button-toggle/index.js +1 -1
- package/dist/esm/button-toggle/button-toggle-group/index.js +1 -1
- package/dist/esm/button-toggle/index.js +1 -1
- package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
- package/dist/esm/calendar/calendar-menu/index.js +1 -1
- package/dist/esm/calendar/index.js +1 -1
- package/dist/esm/card/index.js +1 -1
- package/dist/esm/checkbox/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chips/chip/index.js +1 -1
- package/dist/esm/chips/chip-set/index.js +1 -1
- package/dist/esm/chips/index.js +1 -1
- package/dist/esm/chunks/chunk.2LIWNFQK.js +7 -0
- package/dist/esm/chunks/{chunk.FWFOOQMA.js → chunk.2WSXSOYB.js} +2 -2
- package/dist/esm/chunks/{chunk.YWNCJ7XP.js → chunk.37JFBP4X.js} +2 -2
- package/dist/esm/chunks/{chunk.D5TAI6Q7.js → chunk.3X4N4ZPY.js} +2 -2
- package/dist/esm/chunks/{chunk.LK4AAUOP.js → chunk.436MTO6R.js} +2 -2
- package/dist/esm/chunks/{chunk.P2ZCNO63.js → chunk.4CXLGEJO.js} +2 -2
- package/dist/esm/chunks/{chunk.P2ZCNO63.js.map → chunk.4CXLGEJO.js.map} +1 -1
- package/dist/esm/chunks/{chunk.EK24Y56W.js → chunk.4JF54GDJ.js} +2 -2
- package/dist/esm/chunks/{chunk.SMGXXR6K.js → chunk.4USQ2AP6.js} +2 -2
- package/dist/esm/chunks/{chunk.MHBBMC6O.js → chunk.4XJYS5WH.js} +2 -2
- package/dist/esm/chunks/{chunk.7TMLILLW.js → chunk.5ASOX23Q.js} +2 -2
- package/dist/esm/chunks/{chunk.7TMLILLW.js.map → chunk.5ASOX23Q.js.map} +1 -1
- package/dist/esm/chunks/{chunk.624UKZFU.js → chunk.66X366TV.js} +2 -2
- package/dist/esm/chunks/chunk.6VSFLBZF.js +7 -0
- package/dist/esm/chunks/{chunk.7DB3XVPI.js.map → chunk.6VSFLBZF.js.map} +3 -3
- package/dist/esm/chunks/chunk.7L66GZDN.js +7 -0
- package/dist/esm/chunks/{chunk.4YFVG4KP.js → chunk.7M4HRJYP.js} +2 -2
- package/dist/esm/chunks/{chunk.CKW7KKDW.js → chunk.7PPBXNAD.js} +2 -2
- package/dist/esm/chunks/{chunk.A62DE5PD.js → chunk.7UJAI6P2.js} +2 -2
- package/dist/esm/chunks/{chunk.UJ2WQOLO.js → chunk.A3ZDCBLA.js} +2 -2
- package/dist/esm/chunks/{chunk.2QHD3DCR.js → chunk.AHAARGYM.js} +2 -2
- package/dist/esm/chunks/chunk.AQ7ROWO4.js +7 -0
- package/dist/esm/chunks/chunk.AQ7ROWO4.js.map +7 -0
- package/dist/esm/chunks/{chunk.Q7Z3SJ5F.js → chunk.AY43NTAK.js} +2 -2
- package/dist/esm/chunks/{chunk.AEKOP3XT.js → chunk.C2MQN7MI.js} +2 -2
- package/dist/esm/chunks/{chunk.AEKOP3XT.js.map → chunk.C2MQN7MI.js.map} +2 -2
- package/dist/esm/chunks/{chunk.K3KAM2PL.js → chunk.C5ZUGOOC.js} +2 -2
- package/dist/esm/chunks/{chunk.QOJESHEV.js → chunk.C7VEJINB.js} +2 -2
- package/dist/esm/chunks/{chunk.YLG6ZC5K.js → chunk.CBIHNCT5.js} +2 -2
- package/dist/esm/chunks/{chunk.JIKSKUDW.js → chunk.CLD75EBJ.js} +2 -2
- package/dist/esm/chunks/chunk.CMRVP4EA.js +7 -0
- package/dist/esm/chunks/chunk.CMRVP4EA.js.map +7 -0
- package/dist/esm/chunks/{chunk.TK5I4RHF.js → chunk.CQQSOTZ5.js} +2 -2
- package/dist/esm/chunks/chunk.CZEF72BG.js +12 -0
- package/dist/esm/chunks/chunk.CZEF72BG.js.map +7 -0
- package/dist/esm/chunks/chunk.D5ZHKPCL.js +7 -0
- package/dist/esm/chunks/chunk.D5ZHKPCL.js.map +7 -0
- package/dist/esm/chunks/{chunk.XKI46BH2.js → chunk.DABGA7I6.js} +2 -2
- package/dist/esm/chunks/{chunk.MTKSU2BV.js → chunk.DH76CMUT.js} +2 -2
- package/dist/esm/chunks/{chunk.MXEKIEJA.js → chunk.DLQSINSS.js} +2 -2
- package/dist/esm/chunks/{chunk.W4247Q2P.js → chunk.DQVYB55P.js} +2 -2
- package/dist/esm/chunks/chunk.E4TAHUQO.js +177 -0
- package/dist/esm/chunks/chunk.E4TAHUQO.js.map +7 -0
- package/dist/esm/chunks/{chunk.WPG7NNQX.js → chunk.EY37FYZ4.js} +2 -2
- package/dist/esm/chunks/chunk.FK6NNHXH.js +7 -0
- package/dist/esm/chunks/chunk.FK6NNHXH.js.map +7 -0
- package/dist/esm/chunks/chunk.G6JWSERI.js +7 -0
- package/dist/esm/chunks/{chunk.F74YURLV.js.map → chunk.G6JWSERI.js.map} +4 -4
- package/dist/esm/chunks/chunk.GHR7T6U2.js +7 -0
- package/dist/esm/chunks/chunk.GHR7T6U2.js.map +7 -0
- package/dist/esm/chunks/{chunk.LXPFG7MW.js → chunk.GWIXDVIA.js} +2 -2
- package/dist/esm/chunks/{chunk.Z6FCL3G3.js → chunk.HBCDD25D.js} +2 -2
- package/dist/esm/chunks/{chunk.M56LSSPW.js → chunk.HDO3WRH7.js} +2 -2
- package/dist/esm/chunks/{chunk.DXN7ZOH3.js → chunk.HGH6SSHZ.js} +2 -2
- package/dist/esm/chunks/chunk.HJ23XQDJ.js +7 -0
- package/dist/esm/chunks/chunk.HJ23XQDJ.js.map +7 -0
- package/dist/esm/chunks/{chunk.LFODKHUO.js → chunk.HKSXC5VK.js} +2 -2
- package/dist/esm/chunks/chunk.I5SFCLDD.js +7 -0
- package/dist/esm/chunks/{chunk.MVTBJPO2.js.map → chunk.I5SFCLDD.js.map} +3 -3
- package/dist/esm/chunks/{chunk.S3JMOOWC.js → chunk.IJ2I25V3.js} +2 -2
- package/dist/esm/chunks/{chunk.JUJGROHA.js → chunk.IURDWGLD.js} +2 -2
- package/dist/esm/chunks/chunk.IXGXASHQ.js +7 -0
- package/dist/esm/chunks/{chunk.YX7WLO5Y.js.map → chunk.IXGXASHQ.js.map} +2 -2
- package/dist/esm/chunks/{chunk.F5SY2D4B.js → chunk.JCO4M4PF.js} +2 -2
- package/dist/esm/chunks/{chunk.5565ZSTH.js → chunk.LNLO36U6.js} +2 -2
- package/dist/esm/chunks/chunk.LV7XF22P.js +7 -0
- package/dist/esm/chunks/chunk.LV7XF22P.js.map +7 -0
- package/dist/esm/chunks/{chunk.NR3MLTXF.js → chunk.MHU452GM.js} +2 -2
- package/dist/esm/chunks/chunk.MLTEGJH6.js +7 -0
- package/dist/esm/chunks/{chunk.N43BCJHN.js → chunk.MWWY5TX5.js} +2 -2
- package/dist/esm/chunks/chunk.NDJZYFRT.js +7 -0
- package/dist/esm/chunks/chunk.NDJZYFRT.js.map +7 -0
- package/dist/esm/chunks/chunk.O5GE3FFV.js +7 -0
- package/dist/esm/chunks/{chunk.VZWNNK7A.js.map → chunk.O5GE3FFV.js.map} +2 -2
- package/dist/esm/chunks/chunk.OQ75YGB6.js +7 -0
- package/dist/esm/chunks/{chunk.B4T3R53C.js.map → chunk.OQ75YGB6.js.map} +2 -2
- package/dist/esm/chunks/chunk.OQAD6MFL.js +7 -0
- package/dist/esm/chunks/chunk.OQAD6MFL.js.map +7 -0
- package/dist/esm/chunks/{chunk.COVTBIQQ.js → chunk.OXGOCF4L.js} +2 -2
- package/dist/esm/chunks/{chunk.BH2TUG2V.js → chunk.PCOOIP2H.js} +2 -2
- package/dist/esm/chunks/chunk.PDICDA2V.js +7 -0
- package/dist/esm/chunks/{chunk.VVXSELXX.js.map → chunk.PDICDA2V.js.map} +2 -2
- package/dist/esm/chunks/{chunk.CWTV3TB3.js → chunk.PDSOXEMY.js} +2 -2
- package/dist/esm/chunks/{chunk.OWCYRSI3.js → chunk.PLNLLKP2.js} +2 -2
- package/dist/esm/chunks/{chunk.MGLL67VO.js → chunk.Q7BWJCT5.js} +2 -2
- package/dist/esm/chunks/chunk.QNVVUUNQ.js +7 -0
- package/dist/esm/chunks/chunk.QNVVUUNQ.js.map +7 -0
- package/dist/esm/chunks/chunk.R2KOYHIZ.js +7 -0
- package/dist/esm/chunks/chunk.R2KOYHIZ.js.map +7 -0
- package/dist/esm/chunks/{chunk.XI3MJSIS.js → chunk.R6NA7SV2.js} +2 -2
- package/dist/esm/chunks/{chunk.6OW6Q3EW.js → chunk.RBFGJH3C.js} +2 -2
- package/dist/esm/chunks/{chunk.JLLHDJSO.js → chunk.RNUGVHZF.js} +2 -2
- package/dist/esm/chunks/{chunk.ULY4H76N.js → chunk.RWUJGZ3R.js} +2 -2
- package/dist/esm/chunks/{chunk.5MZ5SGMO.js → chunk.RXLORASN.js} +2 -2
- package/dist/esm/chunks/chunk.SEWAMWO6.js +7 -0
- package/dist/esm/chunks/chunk.SEWAMWO6.js.map +7 -0
- package/dist/esm/chunks/chunk.TCFKFKZW.js +7 -0
- package/dist/esm/chunks/chunk.TCFKFKZW.js.map +7 -0
- package/dist/esm/chunks/{chunk.VSQOTSAO.js → chunk.TGVLYX5F.js} +2 -2
- package/dist/esm/chunks/{chunk.TYLOAD7R.js → chunk.TSH7BTC3.js} +2 -2
- package/dist/esm/chunks/{chunk.BY25RT52.js → chunk.U5XNDTSZ.js} +2 -2
- package/dist/esm/chunks/chunk.UAKQY7QB.js +7 -0
- package/dist/esm/chunks/chunk.UAKQY7QB.js.map +7 -0
- package/dist/esm/chunks/{chunk.SFCGOCQK.js → chunk.UAVC4YLD.js} +2 -2
- package/dist/esm/chunks/{chunk.SJJS4LYN.js → chunk.URFSXQKR.js} +2 -2
- package/dist/esm/chunks/{chunk.4ZKX3SO5.js → chunk.UVJFHSMF.js} +2 -2
- package/dist/esm/chunks/chunk.UZPZ6KUN.js +7 -0
- package/dist/esm/chunks/chunk.UZPZ6KUN.js.map +7 -0
- package/dist/esm/chunks/{chunk.YRMR7IOS.js → chunk.V6443MP3.js} +2 -2
- package/dist/esm/chunks/chunk.V6443MP3.js.map +7 -0
- package/dist/esm/chunks/chunk.VAAID3SH.js +7 -0
- package/dist/esm/chunks/chunk.VAAID3SH.js.map +7 -0
- package/dist/esm/chunks/chunk.VDGJ4UDL.js +7 -0
- package/dist/esm/chunks/chunk.VDGJ4UDL.js.map +7 -0
- package/dist/esm/chunks/{chunk.KJP2VA6Q.js → chunk.VPNDAKM3.js} +2 -2
- package/dist/esm/chunks/{chunk.KJP2VA6Q.js.map → chunk.VPNDAKM3.js.map} +2 -2
- package/dist/esm/chunks/{chunk.DG4ZM3AW.js → chunk.W7H2ZYNR.js} +2 -2
- package/dist/esm/chunks/chunk.WCTSXMGU.js +7 -0
- package/dist/esm/chunks/chunk.WCTSXMGU.js.map +7 -0
- package/dist/esm/chunks/{chunk.FCATJM34.js → chunk.WJXDDQUK.js} +2 -2
- package/dist/esm/chunks/{chunk.SU4FU7GK.js → chunk.WK2L7BPJ.js} +2 -2
- package/dist/esm/chunks/{chunk.ZKGSQQGU.js → chunk.WOMYKBUG.js} +2 -2
- package/dist/esm/chunks/chunk.WOMYKBUG.js.map +7 -0
- package/dist/esm/chunks/{chunk.MACPUZC2.js → chunk.WVGIT7F7.js} +2 -2
- package/dist/esm/chunks/{chunk.MACPUZC2.js.map → chunk.WVGIT7F7.js.map} +2 -2
- package/dist/esm/chunks/{chunk.LTT67HTW.js → chunk.WWTQAN4G.js} +2 -2
- package/dist/esm/chunks/chunk.YA3RDJCV.js +7 -0
- package/dist/esm/chunks/chunk.YA3RDJCV.js.map +7 -0
- package/dist/esm/chunks/{chunk.6OUJSOJY.js → chunk.YIFI5D2X.js} +2 -2
- package/dist/esm/chunks/{chunk.6OUJSOJY.js.map → chunk.YIFI5D2X.js.map} +2 -2
- package/dist/esm/chunks/chunk.YOXZOPAC.js +7 -0
- package/dist/esm/chunks/chunk.YOXZOPAC.js.map +7 -0
- package/dist/esm/chunks/{chunk.CDGZYUQS.js → chunk.YP2NHWIW.js} +2 -2
- package/dist/esm/chunks/chunk.YPA27RX7.js +7 -0
- package/dist/esm/chunks/chunk.YXXKPT6P.js +7 -0
- package/dist/esm/chunks/{chunk.PEBT47AU.js.map → chunk.YXXKPT6P.js.map} +2 -2
- package/dist/esm/chunks/{chunk.2EWV2XBP.js → chunk.Z6AFASMO.js} +2 -2
- package/dist/esm/chunks/{chunk.6GC5AJPE.js → chunk.ZMUDT5UK.js} +2 -2
- package/dist/esm/chunks/{chunk.6GC5AJPE.js.map → chunk.ZMUDT5UK.js.map} +2 -2
- package/dist/esm/chunks/{chunk.ZJC2DSNM.js → chunk.ZREXLSAJ.js} +2 -2
- package/dist/esm/chunks/chunk.ZYVXIP42.js +7 -0
- package/dist/esm/chunks/{chunk.SBYX7VZ4.js.map → chunk.ZYVXIP42.js.map} +2 -2
- package/dist/esm/circular-progress/index.js +1 -1
- package/dist/esm/color-picker/index.js +1 -1
- package/dist/esm/core/base/index.js +1 -1
- package/dist/esm/core/index.js +1 -1
- package/dist/esm/core/utils/index.js +1 -1
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/dialog/index.js +1 -1
- package/dist/esm/divider/index.js +1 -1
- package/dist/esm/drawer/base/index.js +1 -1
- package/dist/esm/drawer/drawer/index.js +1 -1
- package/dist/esm/drawer/index.js +1 -1
- package/dist/esm/drawer/mini-drawer/index.js +1 -1
- package/dist/esm/drawer/modal-drawer/index.js +1 -1
- package/dist/esm/expansion-panel/index.js +1 -1
- package/dist/esm/file-picker/index.js +1 -1
- package/dist/esm/floating-action-button/index.js +1 -1
- package/dist/esm/floating-label/index.js +1 -1
- package/dist/esm/focus-indicator/index.js +1 -1
- package/dist/esm/icon/index.js +1 -1
- package/dist/esm/icon-button/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/inline-message/index.js +1 -1
- package/dist/esm/keyboard-shortcut/index.js +1 -1
- package/dist/esm/label-value/index.js +1 -1
- package/dist/esm/linear-progress/index.js +1 -1
- package/dist/esm/list/index.js +1 -1
- package/dist/esm/list/list/index.js +1 -1
- package/dist/esm/list/list-item/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/open-icon/index.js +1 -1
- package/dist/esm/page-state/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/popup/index.js +1 -1
- package/dist/esm/product-icon/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/quantity-field/index.js +1 -1
- package/dist/esm/radio/index.js +1 -1
- package/dist/esm/ripple/index.js +1 -1
- package/dist/esm/scaffold/index.js +1 -1
- package/dist/esm/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/option/index.js +1 -1
- package/dist/esm/select/option-group/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/index.js +1 -1
- package/dist/esm/skeleton/index.js +1 -1
- package/dist/esm/slider/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/stack/index.js +1 -1
- package/dist/esm/state-layer/index.js +1 -1
- package/dist/esm/stepper/index.js +1 -1
- package/dist/esm/stepper/step/index.js +1 -1
- package/dist/esm/stepper/stepper/index.js +1 -1
- package/dist/esm/switch/index.js +1 -1
- package/dist/esm/table/index.js +1 -1
- package/dist/esm/tabs/index.js +1 -1
- package/dist/esm/tabs/tab/index.js +1 -1
- package/dist/esm/tabs/tab-bar/index.js +1 -1
- package/dist/esm/text-field/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/dist/esm/toast/index.js +1 -1
- package/dist/esm/toolbar/index.js +1 -1
- package/dist/esm/tooltip/index.js +1 -1
- package/dist/esm/view-switcher/index.js +1 -1
- package/dist/esm/view-switcher/view/index.js +1 -1
- package/dist/forge-dark.css +1 -1
- package/dist/forge.css +1 -1
- package/dist/theme/forge-theme.css +1 -1
- package/dist/typography/forge-typography-legacy.css +1 -1
- package/dist/typography/forge-typography.css +1 -1
- package/esm/autocomplete/autocomplete-constants.d.ts +3 -0
- package/esm/autocomplete/autocomplete-foundation.d.ts +3 -1
- package/esm/autocomplete/autocomplete-foundation.js +14 -0
- package/esm/autocomplete/autocomplete.d.ts +7 -1
- package/esm/autocomplete/autocomplete.js +7 -0
- package/esm/banner/banner.js +1 -1
- package/esm/button-area/button-area-adapter.d.ts +48 -0
- package/esm/button-area/button-area-adapter.js +121 -0
- package/esm/button-area/button-area-constants.d.ts +24 -0
- package/esm/button-area/button-area-constants.js +30 -0
- package/esm/button-area/button-area-foundation.d.ts +29 -0
- package/esm/button-area/button-area-foundation.js +94 -0
- package/esm/button-area/button-area.d.ts +29 -0
- package/esm/button-area/button-area.js +55 -0
- package/esm/button-area/index.d.ts +10 -0
- package/esm/button-area/index.js +14 -0
- package/esm/calendar/calendar-foundation.js +6 -0
- package/esm/calendar/calendar-menu/calendar-menu.js +1 -1
- package/esm/chip-field/chip-field-adapter.js +1 -1
- package/esm/chip-field/chip-field.js +2 -2
- package/esm/circular-progress/circular-progress.js +1 -1
- package/esm/core/base/base-adapter.d.ts +5 -2
- package/esm/core/base/base-adapter.js +13 -2
- package/esm/core/base/base-component.d.ts +37 -0
- package/esm/core/base/base-component.js +3 -0
- package/esm/core/keyboard/key-manager.d.ts +18 -0
- package/esm/core/keyboard/key-manager.js +47 -0
- package/esm/core/utils/a11y-utils.d.ts +32 -0
- package/esm/core/utils/a11y-utils.js +111 -0
- package/esm/core/utils/index.d.ts +1 -0
- package/esm/core/utils/index.js +1 -0
- package/esm/core/utils/utils.d.ts +8 -0
- package/esm/core/utils/utils.js +15 -0
- package/esm/date-picker/base/base-date-picker-foundation.js +1 -1
- package/esm/date-range-picker/date-range-picker-foundation.js +2 -2
- package/esm/drawer/drawer/drawer.js +1 -1
- package/esm/drawer/mini-drawer/mini-drawer.js +1 -1
- package/esm/drawer/modal-drawer/modal-drawer.js +1 -1
- package/esm/expansion-panel/expansion-panel-adapter.d.ts +1 -0
- package/esm/expansion-panel/expansion-panel-adapter.js +7 -2
- package/esm/expansion-panel/expansion-panel.js +1 -1
- package/esm/field/field-foundation.d.ts +1 -0
- package/esm/field/field-foundation.js +17 -7
- package/esm/floating-label/floating-label-foundation.d.ts +4 -1
- package/esm/floating-label/floating-label-foundation.js +9 -6
- package/esm/floating-label/floating-label.d.ts +6 -2
- package/esm/floating-label/floating-label.js +2 -2
- package/esm/focus-indicator/focus-indicator-foundation.js +1 -1
- package/esm/focus-indicator/focus-indicator.js +1 -1
- package/esm/icon/icon-adapter.d.ts +0 -2
- package/esm/icon/icon-adapter.js +4 -5
- package/esm/icon/icon-foundation.js +0 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +4 -1
- package/esm/keyboard-shortcut/keyboard-shortcut-constants.d.ts +1 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-foundation.d.ts +6 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-foundation.js +9 -0
- package/esm/keyboard-shortcut/keyboard-shortcut.d.ts +4 -0
- package/esm/keyboard-shortcut/keyboard-shortcut.js +3 -0
- package/esm/linear-progress/linear-progress.js +1 -1
- package/esm/list/list/list-adapter.d.ts +17 -41
- package/esm/list/list/list-adapter.js +43 -60
- package/esm/list/list/list-constants.d.ts +13 -5
- package/esm/list/list/list-constants.js +15 -7
- package/esm/list/list/list-foundation.d.ts +24 -16
- package/esm/list/list/list-foundation.js +84 -75
- package/esm/list/list/list.d.ts +47 -8
- package/esm/list/list/list.js +83 -11
- package/esm/list/list-item/list-item-adapter.d.ts +31 -90
- package/esm/list/list-item/list-item-adapter.js +124 -135
- package/esm/list/list-item/list-item-constants.d.ts +27 -27
- package/esm/list/list-item/list-item-constants.js +17 -32
- package/esm/list/list-item/list-item-foundation.d.ts +32 -56
- package/esm/list/list-item/list-item-foundation.js +111 -206
- package/esm/list/list-item/list-item.d.ts +109 -37
- package/esm/list/list-item/list-item.js +152 -88
- package/esm/list-dropdown/list-dropdown-adapter.js +1 -6
- package/esm/list-dropdown/list-dropdown-constants.d.ts +4 -0
- package/esm/list-dropdown/list-dropdown-utils.js +23 -24
- package/esm/paginator/paginator-adapter.d.ts +28 -24
- package/esm/paginator/paginator-adapter.js +55 -0
- package/esm/paginator/paginator-foundation.d.ts +33 -80
- package/esm/paginator/paginator-foundation.js +218 -255
- package/esm/paginator/paginator.d.ts +0 -2
- package/esm/paginator/paginator.js +0 -2
- package/esm/popup/popup-adapter.d.ts +3 -1
- package/esm/popup/popup-adapter.js +3 -0
- package/esm/popup/popup-foundation.js +5 -3
- package/esm/popup/popup.d.ts +4 -1
- package/esm/popup/popup.js +1 -1
- package/esm/select/core/base-select-adapter.js +3 -0
- package/esm/select/option/option-constants.d.ts +1 -0
- package/esm/select/option/option-constants.js +1 -0
- package/esm/select/option/option-foundation.d.ts +13 -0
- package/esm/select/option/option-foundation.js +28 -0
- package/esm/select/option/option.d.ts +7 -0
- package/esm/select/option/option.js +13 -0
- package/esm/slider/slider.js +2 -2
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/state-layer/state-layer.js +1 -1
- package/esm/switch/switch-adapter.d.ts +38 -0
- package/esm/switch/switch-adapter.js +69 -0
- package/esm/switch/switch-component-delegate.d.ts +2 -1
- package/esm/switch/switch-component-delegate.js +8 -8
- package/esm/switch/switch-constants.d.ts +14 -7
- package/esm/switch/switch-constants.js +17 -9
- package/esm/switch/switch-foundation.d.ts +46 -0
- package/esm/switch/switch-foundation.js +110 -0
- package/esm/switch/switch.d.ts +150 -33
- package/esm/switch/switch.js +226 -142
- package/esm/tabs/tab/tab.js +2 -2
- package/esm/tabs/tab-bar/tab-bar.js +1 -1
- package/esm/time-picker/time-picker-foundation.js +3 -3
- package/package.json +1 -6
- package/styles/button-area/_mixins.scss +47 -0
- package/styles/button-area/button-area.scss +16 -0
- package/styles/calendar/calendar-menu/_mixins.scss +48 -2
- package/styles/chip-field/_base.scss +1 -0
- package/styles/chip-field/_selector.scss +2 -2
- package/styles/core/styles/_utils.scss +85 -11
- package/styles/core/styles/scrollbar/index.scss +45 -0
- package/styles/core/styles/spacing/index.scss +1 -1
- package/styles/core/styles/theme/_color-utils.scss +63 -0
- package/styles/core/styles/theme/_utils.scss +82 -0
- package/styles/core/styles/theme/index.scss +39 -13
- package/styles/core/styles/tokens/circular-progress/_tokens.scss +1 -1
- package/styles/core/styles/tokens/color-palette/_extended-color-palette.scss +88 -0
- package/styles/core/styles/tokens/color-palette/index.scss +7 -0
- package/styles/core/styles/tokens/focus-indicator/_tokens.scss +2 -2
- package/styles/core/styles/tokens/linear-progress/_tokens.scss +1 -1
- package/styles/core/styles/tokens/list/list/_tokens.scss +16 -0
- package/styles/core/styles/tokens/list/list-item/_tokens.scss +77 -0
- package/styles/core/styles/tokens/scrollbar/_tokens.scss +26 -0
- package/styles/core/styles/tokens/slider/_tokens.scss +9 -11
- package/styles/core/styles/tokens/spacing/_tokens.scss +10 -10
- package/styles/core/styles/tokens/state-layer/_tokens.scss +5 -5
- package/styles/core/styles/tokens/switch/_tokens.scss +108 -0
- package/styles/core/styles/tokens/tabs/tab/_tokens.scss +3 -1
- package/styles/core/styles/tokens/tabs/tab-bar/_tokens.scss +1 -1
- package/styles/core/styles/tokens/theme/_color-emphasis.scss +38 -0
- package/styles/core/styles/tokens/theme/_token-utils.scss +46 -0
- package/styles/core/styles/tokens/theme/_tokens.core.scss +45 -0
- package/styles/core/styles/tokens/theme/_tokens.scss +62 -117
- package/styles/core/styles/tokens/theme/_tokens.status.scss +49 -0
- package/styles/core/styles/tokens/theme/_tokens.surface.scss +65 -0
- package/styles/core/styles/tokens/theme/_tokens.text.scss +38 -0
- package/styles/core/styles/tokens/theme/_tokens.utilities.scss +30 -0
- package/styles/core/styles/tokens/typography/_scale.scss +39 -0
- package/styles/core/styles/tokens/typography/_tokens.body.scss +41 -0
- package/styles/core/styles/tokens/typography/_tokens.core.scss +31 -0
- package/styles/core/styles/tokens/typography/_tokens.display.scss +67 -0
- package/styles/core/styles/tokens/typography/_tokens.heading.scss +70 -0
- package/styles/core/styles/tokens/typography/_tokens.label.scss +37 -0
- package/styles/core/styles/tokens/typography/_tokens.scss +16 -211
- package/styles/core/styles/tokens/typography/_tokens.subheading.scss +66 -0
- package/styles/core/styles/tokens/typography/_type-utils.scss +37 -0
- package/styles/core/styles/tokens/typography/_weight.scss +20 -0
- package/styles/core/styles/typography/index.scss +31 -6
- package/styles/list/list/_configuration.scss +12 -0
- package/styles/list/list/_core.scss +21 -0
- package/styles/list/list/index.scss +7 -0
- package/styles/list/list/list.scss +19 -4
- package/styles/list/list-item/_configuration.scss +72 -0
- package/styles/list/list-item/_core.scss +200 -0
- package/styles/list/list-item/index.scss +7 -0
- package/styles/list/list-item/list-item.scss +193 -13
- package/styles/slider/_core.scss +2 -8
- package/styles/slider/slider.scss +2 -2
- package/styles/switch/_configuration.scss +95 -0
- package/styles/switch/_core.scss +255 -0
- package/styles/switch/index.scss +7 -0
- package/styles/switch/switch.scss +136 -50
- package/styles/tabs/tab/_configuration.scss +5 -0
- package/styles/tabs/tab/_core.scss +7 -7
- package/styles/tabs/tab/tab.scss +3 -2
- package/styles/theme/_theme-dark.scss +0 -2
- package/styles/theme/_theme.scss +3 -45
- package/styles/theme/forge-theme.scss +21 -3
- package/styles/typography/_mixins.scss +0 -20
- package/dist/esm/chunks/chunk.2AJ7FFI6.js +0 -7
- package/dist/esm/chunks/chunk.2AJ7FFI6.js.map +0 -7
- package/dist/esm/chunks/chunk.3HB22HCX.js +0 -7
- package/dist/esm/chunks/chunk.4C6KHYUO.js +0 -7
- package/dist/esm/chunks/chunk.54OOOQ4R.js +0 -7
- package/dist/esm/chunks/chunk.54OOOQ4R.js.map +0 -7
- package/dist/esm/chunks/chunk.7CGKFRBK.js +0 -7
- package/dist/esm/chunks/chunk.7CGKFRBK.js.map +0 -7
- package/dist/esm/chunks/chunk.7DB3XVPI.js +0 -7
- package/dist/esm/chunks/chunk.ALIYGJXA.js +0 -129
- package/dist/esm/chunks/chunk.ALIYGJXA.js.map +0 -7
- package/dist/esm/chunks/chunk.B4T3R53C.js +0 -7
- package/dist/esm/chunks/chunk.BKL2BAYW.js +0 -7
- package/dist/esm/chunks/chunk.BKL2BAYW.js.map +0 -7
- package/dist/esm/chunks/chunk.CXY6K7EI.js +0 -7
- package/dist/esm/chunks/chunk.CXY6K7EI.js.map +0 -7
- package/dist/esm/chunks/chunk.DBNJHUYY.js +0 -7
- package/dist/esm/chunks/chunk.DBNJHUYY.js.map +0 -7
- package/dist/esm/chunks/chunk.DMCBAYQX.js +0 -7
- package/dist/esm/chunks/chunk.DMCBAYQX.js.map +0 -7
- package/dist/esm/chunks/chunk.F4VXEE76.js +0 -7
- package/dist/esm/chunks/chunk.F4VXEE76.js.map +0 -7
- package/dist/esm/chunks/chunk.F74YURLV.js +0 -7
- package/dist/esm/chunks/chunk.FG2GNAM2.js +0 -7
- package/dist/esm/chunks/chunk.FG2GNAM2.js.map +0 -7
- package/dist/esm/chunks/chunk.GNG64TXK.js +0 -7
- package/dist/esm/chunks/chunk.GNG64TXK.js.map +0 -7
- package/dist/esm/chunks/chunk.HHCO64F3.js +0 -7
- package/dist/esm/chunks/chunk.HHCO64F3.js.map +0 -7
- package/dist/esm/chunks/chunk.ISC7SZSP.js +0 -7
- package/dist/esm/chunks/chunk.ISC7SZSP.js.map +0 -7
- package/dist/esm/chunks/chunk.IX25DYIM.js +0 -7
- package/dist/esm/chunks/chunk.IX25DYIM.js.map +0 -7
- package/dist/esm/chunks/chunk.MVTBJPO2.js +0 -7
- package/dist/esm/chunks/chunk.P2CW5MQO.js +0 -12
- package/dist/esm/chunks/chunk.P2CW5MQO.js.map +0 -7
- package/dist/esm/chunks/chunk.PEBT47AU.js +0 -7
- package/dist/esm/chunks/chunk.PH3HUFJJ.js +0 -7
- package/dist/esm/chunks/chunk.PH3HUFJJ.js.map +0 -7
- package/dist/esm/chunks/chunk.Q7JUJNYD.js +0 -7
- package/dist/esm/chunks/chunk.QCRRHGBA.js +0 -7
- package/dist/esm/chunks/chunk.QCRRHGBA.js.map +0 -7
- package/dist/esm/chunks/chunk.SBYX7VZ4.js +0 -7
- package/dist/esm/chunks/chunk.VVXSELXX.js +0 -7
- package/dist/esm/chunks/chunk.VZWNNK7A.js +0 -7
- package/dist/esm/chunks/chunk.X3C3J5MH.js +0 -7
- package/dist/esm/chunks/chunk.X3C3J5MH.js.map +0 -7
- package/dist/esm/chunks/chunk.XGOAYMK2.js +0 -7
- package/dist/esm/chunks/chunk.XGOAYMK2.js.map +0 -7
- package/dist/esm/chunks/chunk.YRMR7IOS.js.map +0 -7
- package/dist/esm/chunks/chunk.YX7WLO5Y.js +0 -7
- package/dist/esm/chunks/chunk.YZLASVCK.js +0 -177
- package/dist/esm/chunks/chunk.YZLASVCK.js.map +0 -7
- package/dist/esm/chunks/chunk.ZDD2NLGP.js +0 -7
- package/dist/esm/chunks/chunk.ZKGSQQGU.js.map +0 -7
- package/dist/esm/chunks/chunk.ZVBZ3LGP.js +0 -7
- package/dist/esm/chunks/chunk.ZVBZ3LGP.js.map +0 -7
- package/styles/list/list/_mixins.scss +0 -45
- package/styles/list/list-item/_mixins.scss +0 -413
- package/styles/list/list-item/_variables.scss +0 -43
- package/styles/switch/_switch-mixins.scss +0 -301
- package/styles/switch/_switch-theme.scss +0 -701
- /package/dist/esm/chunks/{chunk.Q7JUJNYD.js.map → chunk.2LIWNFQK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FWFOOQMA.js.map → chunk.2WSXSOYB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YWNCJ7XP.js.map → chunk.37JFBP4X.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.D5TAI6Q7.js.map → chunk.3X4N4ZPY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LK4AAUOP.js.map → chunk.436MTO6R.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.EK24Y56W.js.map → chunk.4JF54GDJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SMGXXR6K.js.map → chunk.4USQ2AP6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MHBBMC6O.js.map → chunk.4XJYS5WH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.624UKZFU.js.map → chunk.66X366TV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZDD2NLGP.js.map → chunk.7L66GZDN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4YFVG4KP.js.map → chunk.7M4HRJYP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CKW7KKDW.js.map → chunk.7PPBXNAD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.A62DE5PD.js.map → chunk.7UJAI6P2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UJ2WQOLO.js.map → chunk.A3ZDCBLA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2QHD3DCR.js.map → chunk.AHAARGYM.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Q7Z3SJ5F.js.map → chunk.AY43NTAK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.K3KAM2PL.js.map → chunk.C5ZUGOOC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QOJESHEV.js.map → chunk.C7VEJINB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YLG6ZC5K.js.map → chunk.CBIHNCT5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JIKSKUDW.js.map → chunk.CLD75EBJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.TK5I4RHF.js.map → chunk.CQQSOTZ5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XKI46BH2.js.map → chunk.DABGA7I6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MTKSU2BV.js.map → chunk.DH76CMUT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MXEKIEJA.js.map → chunk.DLQSINSS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.W4247Q2P.js.map → chunk.DQVYB55P.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WPG7NNQX.js.map → chunk.EY37FYZ4.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LXPFG7MW.js.map → chunk.GWIXDVIA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Z6FCL3G3.js.map → chunk.HBCDD25D.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.M56LSSPW.js.map → chunk.HDO3WRH7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DXN7ZOH3.js.map → chunk.HGH6SSHZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LFODKHUO.js.map → chunk.HKSXC5VK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.S3JMOOWC.js.map → chunk.IJ2I25V3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JUJGROHA.js.map → chunk.IURDWGLD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.F5SY2D4B.js.map → chunk.JCO4M4PF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.5565ZSTH.js.map → chunk.LNLO36U6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NR3MLTXF.js.map → chunk.MHU452GM.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4C6KHYUO.js.map → chunk.MLTEGJH6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.N43BCJHN.js.map → chunk.MWWY5TX5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.COVTBIQQ.js.map → chunk.OXGOCF4L.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BH2TUG2V.js.map → chunk.PCOOIP2H.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CWTV3TB3.js.map → chunk.PDSOXEMY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OWCYRSI3.js.map → chunk.PLNLLKP2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MGLL67VO.js.map → chunk.Q7BWJCT5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XI3MJSIS.js.map → chunk.R6NA7SV2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6OW6Q3EW.js.map → chunk.RBFGJH3C.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JLLHDJSO.js.map → chunk.RNUGVHZF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ULY4H76N.js.map → chunk.RWUJGZ3R.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.5MZ5SGMO.js.map → chunk.RXLORASN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.VSQOTSAO.js.map → chunk.TGVLYX5F.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.TYLOAD7R.js.map → chunk.TSH7BTC3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BY25RT52.js.map → chunk.U5XNDTSZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SFCGOCQK.js.map → chunk.UAVC4YLD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SJJS4LYN.js.map → chunk.URFSXQKR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4ZKX3SO5.js.map → chunk.UVJFHSMF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DG4ZM3AW.js.map → chunk.W7H2ZYNR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FCATJM34.js.map → chunk.WJXDDQUK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SU4FU7GK.js.map → chunk.WK2L7BPJ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LTT67HTW.js.map → chunk.WWTQAN4G.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CDGZYUQS.js.map → chunk.YP2NHWIW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3HB22HCX.js.map → chunk.YPA27RX7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2EWV2XBP.js.map → chunk.Z6AFASMO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZJC2DSNM.js.map → chunk.ZREXLSAJ.js.map} +0 -0
- /package/styles/core/styles/tokens/{_color-palette.scss → color-palette/_material-color-palette.scss} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../node_modules/@material/switch/constants.ts", "../../../../../../node_modules/@material/base/observer.ts", "../../../../../../node_modules/@material/base/observer-foundation.ts", "../../../../../../node_modules/@material/switch/foundation.ts", "../../../../../../node_modules/@material/switch/component.ts", "../../src/switch/switch-constants.ts", "../../src/switch/switch.ts", "../../src/switch/switch-component-delegate.ts", "../../src/switch/index.ts"],
|
|
4
|
-
"sourcesContent": [null, null, null, null, null, "import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}switch`;\n\nconst classes = {\n LABEL_START: 'forge-switch--label-position-start'\n};\n\nconst selectors = {\n BUTTON: '.mdc-switch',\n CONTAINER: '.forge-switch__container'\n};\n\nconst attributes = {\n DENSE: 'dense',\n DISABLED: 'disabled',\n SELECTED: 'selected',\n LABEL_POSITION: 'label-position',\n BUTTON_ARIA_LABEL: 'button-aria-label'\n};\n\nconst events = {\n SELECT: `${elementName}-select`\n};\n\nexport const SWITCH_CONSTANTS = {\n classes,\n selectors,\n attributes,\n elementName,\n events\n};\n\nexport type SwitchLabelPosition = 'start' | 'end';\n", "import { CustomElement, attachShadowTemplate, coerceBoolean, getShadowElement, emitEvent, toggleAttribute, toggleClass } from '@tylertech/forge-core';\nimport { MDCSwitch } from '@material/switch';\nimport { MDCRipple } from '@material/ripple';\nimport { SwitchLabelPosition, SWITCH_CONSTANTS } from './switch-constants';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-switch__container\\\" part=\\\"root\\\"><button id=\\\"switch-btn\\\" class=\\\"mdc-switch\\\" type=\\\"button\\\" role=\\\"switch\\\" aria-checked=\\\"false\\\" aria-labelledby=\\\"switch-label\\\" part=\\\"button\\\"><div class=\\\"mdc-switch__track\\\" part=\\\"track\\\"></div><div class=\\\"mdc-switch__handle-track\\\" part=\\\"handle-track\\\"><div class=\\\"mdc-switch__handle\\\" part=\\\"handle\\\"><div class=\\\"mdc-switch__shadow\\\" part=\\\"shadow\\\"><div class=\\\"mdc-elevation-overlay\\\" part=\\\"overlay\\\"></div></div><div class=\\\"mdc-switch__ripple\\\" part=\\\"ripple\\\"></div><div class=\\\"mdc-switch__icons\\\" part=\\\"icons\\\"><svg class=\\\"mdc-switch__icon mdc-switch__icon--on\\\" viewBox=\\\"0 0 24 24\\\" part=\\\"icon-on\\\"><path d=\\\"M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z\\\" part=\\\"icon-on-path\\\"/></svg> <svg class=\\\"mdc-switch__icon mdc-switch__icon--off\\\" viewBox=\\\"0 0 24 24\\\" part=\\\"icon-off\\\"><path d=\\\"M20 13H4v-2h16v2z\\\" part=\\\"icon-off-path\\\"/></svg></div></div></div></button> <label id=\\\"switch-label\\\" class=\\\"forge-switch__label\\\" for=\\\"switch-btn\\\" part=\\\"label\\\"><slot></slot></label></div></template>';\nconst styles = '.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);-webkit-transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff)}.mdc-switch{-webkit-box-align:center;align-items:center;background:0 0;border:none;display:-webkit-inline-box;display:inline-flex;flex-shrink:0;margin:0;outline:0;overflow:visible;padding:0;position:relative}.mdc-switch__track{overflow:hidden;position:relative;width:100%}.mdc-switch__track::after,.mdc-switch__track::before{border:1px solid transparent;border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;content:\\\"\\\";height:100%;left:0;position:absolute;width:100%}.mdc-switch__track::before{-webkit-transition:-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);-webkit-transform:translateX(0);transform:translateX(0)}.mdc-switch__track::after{-webkit-transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);-webkit-transform:translateX(-100%);transform:translateX(-100%)}.mdc-switch__track[dir=rtl]::after,[dir=rtl] .mdc-switch__track::after{-webkit-transform:translateX(100%);transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::before{-webkit-transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 75ms 0s cubic-bezier(.4, 0, .6, 1);-webkit-transform:translateX(100%);transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track[dir=rtl]::before,[dir=rtl] .mdc-switch--selected .mdc-switch__track::before{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::after{-webkit-transition:-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 75ms 0s cubic-bezier(0, 0, .2, 1);-webkit-transform:translateX(0);transform:translateX(0)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;-webkit-transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .2, 1);transition:-webkit-transform 75ms 0s cubic-bezier(.4, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .2, 1);transition:transform 75ms 0s cubic-bezier(.4, 0, .2, 1),-webkit-transform 75ms 0s cubic-bezier(.4, 0, .2, 1);left:0;right:auto;-webkit-transform:translateX(0);transform:translateX(0)}.mdc-switch__handle-track[dir=rtl],[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{-webkit-transform:translateX(100%);transform:translateX(100%)}.mdc-switch--selected .mdc-switch__handle-track[dir=rtl],[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.mdc-switch__handle{display:-webkit-box;display:flex;pointer-events:auto;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:0;right:auto}.mdc-switch__handle[dir=rtl],[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mdc-switch__handle::after,.mdc-switch__handle::before{border:1px solid transparent;border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;content:\\\"\\\";width:100%;height:100%;left:0;position:absolute;top:0;-webkit-transition:background-color 75ms 0s cubic-bezier(.4, 0, .2, 1),border-color 75ms 0s cubic-bezier(.4, 0, .2, 1);transition:background-color 75ms 0s cubic-bezier(.4, 0, .2, 1),border-color 75ms 0s cubic-bezier(.4, 0, .2, 1);z-index:-1}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-elevation-overlay{bottom:0;left:0;right:0;top:0}.mdc-switch__ripple{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:-1}.mdc-switch:disabled .mdc-switch__ripple{display:none}.mdc-switch__icons{height:100%;position:relative;width:100%;z-index:1}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;-webkit-transition:opacity 30ms 0s cubic-bezier(.4, 0, 1, 1);transition:opacity 30ms 0s cubic-bezier(.4, 0, 1, 1)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;-webkit-transition:opacity 45ms 30ms cubic-bezier(0, 0, .2, 1);transition:opacity 45ms 30ms cubic-bezier(0, 0, .2, 1)}.mdc-switch{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-switch .mdc-switch__ripple::after,.mdc-switch .mdc-switch__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.mdc-switch .mdc-switch__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-switch .mdc-switch__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-switch.mdc-ripple-upgraded .mdc-switch__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-switch.mdc-ripple-upgraded .mdc-switch__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-switch.mdc-ripple-upgraded--unbounded .mdc-switch__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-switch.mdc-ripple-upgraded--foreground-activation .mdc-switch__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-switch.mdc-ripple-upgraded--foreground-deactivation .mdc-switch__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-switch .mdc-switch__ripple::after,.mdc-switch .mdc-switch__ripple::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-switch.mdc-ripple-upgraded .mdc-switch__ripple::after,.mdc-switch.mdc-ripple-upgraded .mdc-switch__ripple::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-switch.mdc-ripple-upgraded .mdc-switch__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-switch{width:36px;width:var(--mdc-switch-track-width,36px)}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__handle::after{background:#3d5afe;background:var(--mdc-switch-selected-handle-color,#3d5afe)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:#3d477f;background:var(--mdc-switch-selected-hover-handle-color,#3d477f)}.mdc-switch.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:#3d477f;background:var(--mdc-switch-selected-focus-handle-color,#3d477f)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:#3d477f;background:var(--mdc-switch-selected-pressed-handle-color,#3d477f)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle::after{background:#3d5afe;background:var(--mdc-switch-disabled-selected-handle-color,#3d5afe)}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:#9e9e9e;background:var(--mdc-switch-unselected-handle-color,#9e9e9e)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:#212121;background:var(--mdc-switch-unselected-hover-handle-color,#212121)}.mdc-switch.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:#212121;background:var(--mdc-switch-unselected-focus-handle-color,#212121)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:#212121;background:var(--mdc-switch-unselected-pressed-handle-color,#212121)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:#424242;background:var(--mdc-switch-disabled-unselected-handle-color,#424242)}.mdc-switch .mdc-switch__handle::before{background:#fff;background:var(--mdc-switch-handle-surface-color,var(--mdc-theme-surface,#fff))}.mdc-switch:enabled .mdc-switch__shadow{--mdc-elevation-box-shadow-for-gss:0px 2px 1px -1px rgba(0, 0, 0, 0.2),0px 1px 1px 0px rgba(0, 0, 0, 0.14),0px 1px 3px 0px rgba(0, 0, 0, 0.12);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);-webkit-box-shadow:var(--mdc-switch-handle-elevation,var(--mdc-elevation-box-shadow-for-gss));box-shadow:var(--mdc-switch-handle-elevation,var(--mdc-elevation-box-shadow-for-gss))}.mdc-switch:disabled .mdc-switch__shadow{--mdc-elevation-box-shadow-for-gss:0px 0px 0px 0px rgba(0, 0, 0, 0.2),0px 0px 0px 0px rgba(0, 0, 0, 0.14),0px 0px 0px 0px rgba(0, 0, 0, 0.12);-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);-webkit-box-shadow:var(--mdc-switch-disabled-handle-elevation,var(--mdc-elevation-box-shadow-for-gss));box-shadow:var(--mdc-switch-disabled-handle-elevation,var(--mdc-elevation-box-shadow-for-gss))}.mdc-switch .mdc-switch__handle{height:20px;height:var(--mdc-switch-handle-height,20px)}.mdc-switch:disabled .mdc-switch__handle::after{opacity:.24;opacity:var(--mdc-switch-disabled-handle-opacity, .24)}.mdc-switch .mdc-switch__handle{border-radius:10px;border-radius:var(--mdc-switch-handle-shape,10px)}.mdc-switch .mdc-switch__handle{width:20px;width:var(--mdc-switch-handle-width,20px)}.mdc-switch .mdc-switch__handle-track{width:calc(100% - 20px);width:calc(100% - var(--mdc-switch-handle-width,20px))}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-selected-icon-color,var(--mdc-theme-on-primary,#fff))}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-disabled-selected-icon-color,var(--mdc-theme-on-primary,#fff))}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-unselected-icon-color,var(--mdc-theme-on-primary,#fff))}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-disabled-unselected-icon-color,var(--mdc-theme-on-primary,#fff))}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:.54;opacity:var(--mdc-switch-disabled-selected-icon-opacity, .54)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:.54;opacity:var(--mdc-switch-disabled-unselected-icon-opacity, .54)}.mdc-switch.mdc-switch--selected .mdc-switch__icon{width:18px;width:var(--mdc-switch-selected-icon-size,18px);height:18px;height:var(--mdc-switch-selected-icon-size,18px)}.mdc-switch.mdc-switch--unselected .mdc-switch__icon{width:18px;width:var(--mdc-switch-unselected-icon-size,18px);height:18px;height:var(--mdc-switch-unselected-icon-size,18px)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::before{background-color:#3d5afe;background-color:var(--mdc-switch-selected-hover-state-layer-color,#3d5afe)}.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after,.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::before{background-color:#3d5afe;background-color:var(--mdc-switch-selected-focus-state-layer-color,#3d5afe)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::after,.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::before{background-color:#3d5afe;background-color:var(--mdc-switch-selected-pressed-state-layer-color,#3d5afe)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::before{background-color:#424242;background-color:var(--mdc-switch-unselected-hover-state-layer-color,#424242)}.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after,.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::before{background-color:#424242;background-color:var(--mdc-switch-unselected-focus-state-layer-color,#424242)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after,.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::before{background-color:#424242;background-color:var(--mdc-switch-unselected-pressed-state-layer-color,#424242)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before{opacity:.04;opacity:var(--mdc-switch-selected-hover-state-layer-opacity, .04)}.mdc-switch.mdc-switch--selected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-switch-selected-focus-state-layer-opacity, .12)}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.1;opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, .1)}.mdc-switch.mdc-switch--selected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, 0.1)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before{opacity:.04;opacity:var(--mdc-switch-unselected-hover-state-layer-opacity, .04)}.mdc-switch.mdc-switch--unselected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-switch-unselected-focus-state-layer-opacity, .12)}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.1;opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, .1)}.mdc-switch.mdc-switch--unselected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, 0.1)}.mdc-switch .mdc-switch__ripple{height:48px;height:var(--mdc-switch-state-layer-size,48px);width:48px;width:var(--mdc-switch-state-layer-size,48px)}.mdc-switch .mdc-switch__track{height:14px;height:var(--mdc-switch-track-height,14px)}.mdc-switch:disabled .mdc-switch__track{opacity:.12;opacity:var(--mdc-switch-disabled-track-opacity, .12)}.mdc-switch:enabled .mdc-switch__track::after{background:#cfd6ff;background:var(--mdc-switch-selected-track-color,#cfd6ff)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:#cfd6ff;background:var(--mdc-switch-selected-hover-track-color,#cfd6ff)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:#cfd6ff;background:var(--mdc-switch-selected-focus-track-color,#cfd6ff)}.mdc-switch:enabled:active .mdc-switch__track::after{background:#cfd6ff;background:var(--mdc-switch-selected-pressed-track-color,#cfd6ff)}.mdc-switch:disabled .mdc-switch__track::after{background:#3d5afe;background:var(--mdc-switch-disabled-selected-track-color,#3d5afe)}.mdc-switch:enabled .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-track-color,#e0e0e0)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-hover-track-color,#e0e0e0)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-focus-track-color,#e0e0e0)}.mdc-switch:enabled:active .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-pressed-track-color,#e0e0e0)}.mdc-switch:disabled .mdc-switch__track::before{background:#424242;background:var(--mdc-switch-disabled-unselected-track-color,#424242)}.mdc-switch .mdc-switch__track{border-radius:7px;border-radius:var(--mdc-switch-track-shape,7px)}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-switch:disabled .mdc-switch__handle::after{opacity:1;opacity:var(--mdc-switch-disabled-handle-opacity, 1)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:GrayText;fill:var(--mdc-switch-disabled-selected-icon-color,GrayText)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:GrayText;fill:var(--mdc-switch-disabled-unselected-icon-color,GrayText)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:1;opacity:var(--mdc-switch-disabled-selected-icon-opacity, 1)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:1;opacity:var(--mdc-switch-disabled-unselected-icon-opacity, 1)}.mdc-switch:disabled .mdc-switch__track{opacity:1;opacity:var(--mdc-switch-disabled-track-opacity, 1)}}.forge-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;vertical-align:middle}.forge-form-field>label{-webkit-box-ordinal-group:1;order:0;margin-right:auto;padding-left:4px}.forge-form-field forge-switch~label{padding-left:8px}.forge-form-field--align-end>label{-webkit-box-ordinal-group:0;order:-1;margin-left:auto;padding-right:4px}.forge-switch__container{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.forge-switch__container.forge-switch--label-position-start{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;flex-flow:row-reverse}.forge-switch__container.forge-switch--label-position-start .forge-switch__label{margin-left:auto;padding-right:8px}:host{display:inline-block}:host *{cursor:pointer}:host .forge-switch__label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);padding-left:8px}:host([hidden]){display:none}:host([dense]) .mdc-switch__ripple{height:28px;width:28px}:host([disabled]) *{cursor:not-allowed}:host([disabled]) .forge-switch__label{color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}';\nimport { createUserInteractionListener } from '../core/utils';\n\nexport interface ISwitchComponent extends IBaseComponent {\n dense: boolean;\n disabled: boolean;\n selected: boolean;\n labelPosition: SwitchLabelPosition;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-switch': ISwitchComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-switch-select': CustomEvent<boolean>;\n }\n}\n\nclass ForgeMDCSwitch extends MDCSwitch {\n private _destroyUserInteractionListener: (() => void) | undefined;\n\n public override initialize(): void {\n // Do not call super.initialize()\n // We defer instantiation of the ripple until first user interaction\n this._deferRippleInitialization();\n }\n\n public override destroy(): void {\n // We are not calling super.destroy() because it expects `ripple` to be set when it might not be yet\n // We instead just replicate all existing functionality, but allow for `ripple` to be undefined\n this.foundation.destroy();\n this.ripple?.destroy();\n this.root.removeEventListener('click', this.foundation.handleClick);\n\n if (typeof this._destroyUserInteractionListener === 'function') {\n this._destroyUserInteractionListener();\n this._destroyUserInteractionListener = undefined;\n }\n }\n\n private async _deferRippleInitialization(): Promise<void> {\n const { userInteraction, destroy } = createUserInteractionListener(this.root);\n this._destroyUserInteractionListener = destroy;\n const { type } = await userInteraction;\n this._destroyUserInteractionListener = undefined;\n this.ripple = new MDCRipple(this.root, this.createRippleFoundation());\n if (type === 'focusin') {\n // eslint-disable-next-line @typescript-eslint/dot-notation\n this.ripple['foundation'].handleFocus();\n }\n }\n}\n\n/**\n * The custom element class behind the `<forge-switch>` element.\n * \n * @tag forge-switch\n */\n@CustomElement({\n name: SWITCH_CONSTANTS.elementName\n})\nexport class SwitchComponent extends BaseComponent implements ISwitchComponent {\n public static get observedAttributes(): string[] {\n return [\n SWITCH_CONSTANTS.attributes.DENSE,\n SWITCH_CONSTANTS.attributes.DISABLED,\n SWITCH_CONSTANTS.attributes.SELECTED,\n SWITCH_CONSTANTS.attributes.LABEL_POSITION,\n SWITCH_CONSTANTS.attributes.BUTTON_ARIA_LABEL\n ];\n }\n\n private _containerElement: HTMLElement;\n private _buttonElement: HTMLButtonElement;\n private _mdcSwitch: MDCSwitch | undefined;\n private _dense = false;\n private _disabled = false;\n private _selected = false;\n private _labelPosition: SwitchLabelPosition = 'end';\n private _clickListener: (evt: MouseEvent) => void;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._initialize();\n }\n\n private _initialize(): void {\n this._buttonElement = getShadowElement(this, SWITCH_CONSTANTS.selectors.BUTTON) as HTMLButtonElement;\n this._containerElement = getShadowElement(this, SWITCH_CONSTANTS.selectors.CONTAINER);\n this._clickListener = evt => this._onClick(evt);\n }\n\n public connectedCallback(): void {\n // Add our click listener before initializing MDCSwitch to ensure we receive the event **first**\n this._buttonElement.addEventListener('click', this._clickListener);\n\n this._mdcSwitch = new ForgeMDCSwitch(this._buttonElement);\n this._applyInitialState();\n }\n\n public disconnectedCallback(): void {\n this._mdcSwitch?.destroy();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case SWITCH_CONSTANTS.attributes.DENSE:\n this.dense = coerceBoolean(newValue);\n break;\n case SWITCH_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case SWITCH_CONSTANTS.attributes.SELECTED:\n this.selected = coerceBoolean(newValue);\n break;\n case SWITCH_CONSTANTS.attributes.LABEL_POSITION:\n this.labelPosition = newValue as SwitchLabelPosition;\n break;\n case SWITCH_CONSTANTS.attributes.BUTTON_ARIA_LABEL:\n this._applyButtonLabel(newValue);\n break;\n }\n }\n\n private _applyInitialState(): void {\n if (this._mdcSwitch) {\n this._mdcSwitch.disabled = this._disabled;\n this._mdcSwitch.selected = this._selected;\n }\n\n this._applyDense();\n this._applyLabelPosition();\n this._applyButtonLabel(this.getAttribute(SWITCH_CONSTANTS.attributes.BUTTON_ARIA_LABEL) ?? '');\n }\n\n private _onClick(evt: MouseEvent): void {\n if (this._mdcSwitch?.disabled) {\n return;\n }\n\n // Prevents MDCSwitch from receiving the click event in the targeting phase.\n // We will handle updating the selected state of MDCSwitch based on the result of our own event.\n evt.stopImmediatePropagation();\n\n const newValue = !this._selected;\n const isCancelled = !emitEvent(this, SWITCH_CONSTANTS.events.SELECT, newValue, true, true);\n \n if (!isCancelled) {\n this._applySelected(newValue);\n }\n }\n\n private _applySelected(value: boolean): void {\n this._selected = value;\n if (this._mdcSwitch) {\n this._mdcSwitch.selected = this._selected;\n }\n }\n\n private _applyDense(): void {\n toggleAttribute(this, this._dense, SWITCH_CONSTANTS.attributes.DENSE);\n this._mdcSwitch?.ripple?.layout();\n }\n\n private _applyLabelPosition(): void {\n toggleClass(this._containerElement, this._labelPosition === 'start', SWITCH_CONSTANTS.classes.LABEL_START);\n }\n\n private _applyButtonLabel(value: string): void {\n if (!this._buttonElement) {\n return;\n }\n toggleAttribute(this._buttonElement, !!value, 'aria-label', value);\n }\n\n public get dense(): boolean {\n return this._dense;\n }\n public set dense(value: boolean) {\n if (this._dense !== value) {\n this._dense = value;\n this._applyDense();\n }\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n if (this._mdcSwitch) {\n this._mdcSwitch.disabled = this._disabled;\n }\n toggleAttribute(this, this._disabled, SWITCH_CONSTANTS.attributes.DISABLED);\n }\n }\n\n public get selected(): boolean {\n return this._selected;\n }\n public set selected(value: boolean) {\n if (this._selected !== value) {\n this._applySelected(value);\n toggleAttribute(this, this._selected, SWITCH_CONSTANTS.attributes.SELECTED);\n }\n }\n\n public get labelPosition(): SwitchLabelPosition {\n return this._labelPosition;\n }\n public set labelPosition(value: SwitchLabelPosition) {\n if (this._labelPosition !== value) {\n this._labelPosition = value;\n this._applyLabelPosition();\n this.setAttribute(SWITCH_CONSTANTS.attributes.LABEL_POSITION, this._labelPosition);\n }\n }\n}\n", "import { FormFieldComponentDelegate, IFormFieldComponentDelegateOptions } from '../core';\nimport { IBaseComponentDelegateConfig } from '../core/delegates/base-component-delegate';\nimport { ISwitchComponent } from './switch';\nimport { SWITCH_CONSTANTS } from './switch-constants';\n\nexport type SwitchComponentDelegateProps = Partial<ISwitchComponent>;\nexport interface ISwitchComponentDelegateOptions extends IFormFieldComponentDelegateOptions {\n id?: string;\n label?: string;\n selected?: boolean;\n}\nexport interface ISwitchComponentDelegateConfig extends IBaseComponentDelegateConfig<ISwitchComponent, ISwitchComponentDelegateOptions> {}\n\nexport class SwitchComponentDelegate extends FormFieldComponentDelegate<ISwitchComponent, ISwitchComponentDelegateOptions> {\n private _labelElement?: HTMLLabelElement;\n\n constructor(config?: ISwitchComponentDelegateConfig) {\n super(config);\n }\n\n public get value(): boolean {\n return this._element.selected;\n }\n public set value(value: boolean) {\n this._element.selected = value;\n }\n\n public get disabled(): boolean {\n return this._element.disabled;\n }\n public set disabled(value: boolean) {\n this._element.disabled = value;\n }\n\n public get labelElement(): HTMLLabelElement | undefined {\n return this._labelElement;\n }\n\n public onChange(listener: (value: boolean) => void): void {\n this._element.addEventListener('forge-switch-select', ({ detail }: CustomEvent<boolean>) => listener(detail));\n }\n\n public onFocus(listener: (evt: Event) => void): void {\n this._element.addEventListener('focus', evt => listener(evt));\n }\n\n public onBlur(listener: (evt: Event) => void): void {\n this._element.addEventListener('blur', evt => listener(evt));\n }\n\n public setLabel(text: string | null): void {\n if (text) {\n if (this._labelElement) {\n this._labelElement.textContent = text;\n } else {\n this._createLabel(text);\n }\n } else if (this._labelElement) {\n this._element.removeChild(this._labelElement);\n this._labelElement = undefined;\n }\n }\n\n protected _build(): ISwitchComponent {\n return document.createElement(SWITCH_CONSTANTS.elementName);\n }\n\n protected override _configure(): void {\n if (typeof this._config.options?.label === 'string') {\n this._createLabel(this._config.options.label);\n }\n if (this._config.options?.selected !== undefined) {\n this._element.selected = this._config.options.selected;\n }\n if (this._config.options?.id) {\n this._element.id = this._config.options.id;\n }\n }\n\n private _createLabel(text: string): void {\n this._labelElement = document.createElement('label');\n this._labelElement.textContent = text;\n this._element.appendChild(this._labelElement);\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { SwitchComponent } from './switch';\n\nexport * from './switch-constants';\nexport * from './switch';\nexport * from './switch-component-delegate';\n\nexport function defineSwitchComponent(): void {\n defineCustomElement(SwitchComponent);\n}\n"],
|
|
5
|
-
"mappings": "kaA0BA,IAAYA,GAAZ,SAAYA,EAAU,CACpBA,EAAA,WAAA,yBACAA,EAAA,SAAA,uBACAA,EAAA,WAAA,wBACF,GAJYA,IAAAA,EAAU,CAAA,EAAA,EAStB,IAAYC,GAAZ,SAAYA,EAAS,CACnBA,EAAA,OAAA,qBACF,GAFYA,IAAAA,EAAS,CAAA,EAAA,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D,CAEO,SAASC,EAA2B,CACrCA,EACE,KAAK,cACP,KAAK,cAAc,YAAcA,EAEjC,KAAK,aAAaA,CAAI,EAEf,KAAK,gBACd,KAAK,SAAS,YAAY,KAAK,aAAa,EAC5C,KAAK,cAAgB,OAEzB,CAEU,QAA2B,CACnC,OAAO,SAAS,cAAcC,EAAiB,WAAW,CAC5D,CAEmB,YAAmB,CAnExC,IAAAC,EAAAC,EAAAC,EAoEQ,QAAOF,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,QAAU,UACzC,KAAK,aAAa,KAAK,QAAQ,QAAQ,KAAK,IAE1CC,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,YAAa,SACrC,KAAK,SAAS,SAAW,KAAK,QAAQ,QAAQ,WAE5CC,EAAA,KAAK,QAAQ,UAAb,MAAAA,EAAsB,KACxB,KAAK,SAAS,GAAK,KAAK,QAAQ,QAAQ,GAE5C,CAEQ,aAAaJ,EAAoB,CACvC,KAAK,cAAgB,SAAS,cAAc,OAAO,EACnD,KAAK,cAAc,YAAcA,EACjC,KAAK,SAAS,YAAY,KAAK,aAAa,CAC9C,CACF,EC5EO,SAASK,IAA8B,CAC5CC,EAAoBC,CAAe,CACrC",
|
|
6
|
-
"names": ["CssClasses", "Selectors", "observeProperty", "target", "property", "observer", "targetObservers", "installObserver", "observers", "allTargetObservers", "observersMap", "key", "descriptor", "getDescriptor", "observedDescriptor", "__assign", "descGet", "descSet", "value_1", "newValue", "previous", "_b", "__values", "_c", "descriptorTarget", "setObserversEnabled", "enabled", "MDCObserverFoundation", "_super", "__extends", "adapter", "_this", "target", "observers", "cleanup", "_b", "__values", "_c", "property", "observer", "unobserve", "cleanup_1", "cleanup_1_1", "cleanupFn", "observeProperty", "enabled", "setObserversEnabled", "__spreadArray", "__read", "MDCFoundation", "MDCSwitchFoundation", "_super", "__extends", "adapter", "_this", "MDCObserverFoundation", "MDCSwitchRenderFoundation", "_super", "__extends", "CssClasses", "addClass", "className", "MDCSwitchFoundation", "MDCSwitch", "_super", "__extends", "root", "foundation", "_this", "MDCRipple", "rippleElement", "Selectors", "MDCSwitchRenderFoundation", "className", "ariaChecked", "disabled", "MDCRippleFoundation", "__assign", "MDCComponent", "elementName", "COMPONENT_NAME_PREFIX", "classes", "selectors", "attributes", "events", "SWITCH_CONSTANTS", "template", "styles", "ForgeMDCSwitch", "MDCSwitch", "_a", "userInteraction", "destroy", "createUserInteractionListener", "type", "MDCRipple", "SwitchComponent", "BaseComponent", "attachShadowTemplate", "SWITCH_CONSTANTS", "getShadowElement", "evt", "name", "oldValue", "newValue", "coerceBoolean", "emitEvent", "value", "_b", "toggleAttribute", "toggleClass", "__decorateClass", "CustomElement", "SwitchComponentDelegate", "FormFieldComponentDelegate", "config", "value", "listener", "detail", "evt", "text", "SWITCH_CONSTANTS", "_a", "_b", "_c", "defineSwitchComponent", "defineCustomElement", "SwitchComponent"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as E}from"./chunk.44IUAOBP.js";import{A as Ne,B as T,C as Ye,D as q,a as r,f as w,g as m,h as De,i as we,j as Ee,l as v,m as ke,n as xe,o as Ce,p as Me,q as Te,r as Oe,s as Se,t as Ae,u as G,v as Be,w as Ie,x as U,y as Le,z as Fe}from"./chunk.F5SY2D4B.js";import{a as M,j as ye}from"./chunk.SBYX7VZ4.js";import{d as ve}from"./chunk.S3JMOOWC.js";import{c as me}from"./chunk.N43BCJHN.js";import{a as ae}from"./chunk.LEVFMI2Q.js";import{b as be}from"./chunk.MXEKIEJA.js";import{a as se,c as le,r as de,s as ce,w as ue}from"./chunk.FYWPZFLJ.js";import{d as fe,l as ge}from"./chunk.PH3HUFJJ.js";import{e as b,f as he,g as _e}from"./chunk.DMCBAYQX.js";import{a as pe}from"./chunk.PADPL4L3.js";import{a as c}from"./chunk.NVUMRW44.js";import{a as ne}from"./chunk.BKL2BAYW.js";import{a as oe}from"./chunk.DXN7ZOH3.js";import{a as ie,e as re,f as D}from"./chunk.MVTBJPO2.js";import{b as Q,d as L,u as F,v as ee,w as te}from"./chunk.K7FPXAFS.js";import{b as A,g as B,i as C,k as g,l as I}from"./chunk.J2M2MXP2.js";import{d}from"./chunk.M3QDAYD2.js";function V(o,e,t=0){let a=[],i=O(new Date(e,o,1),t),n=new Date(i);n.setDate(i.getDate()+r.numbers.MONTH_LENGTH);for(let s=i;s<n;s.setDate(s.getDate()+1))a.push(new Date(s));return a}function _t(o,e=0){let t=[],a=O(o,e),i=new Date(a);i.setDate(a.getDate()+7);for(let n=a;n<i;n.setDate(n.getDate()+1))t.push(new Date(n));return t}function O(o,e=0){let t=o.getDay(),a=new Date(o),i=t>=e?t-e:7+(t-e);return a.setDate(o.getDate()-i),a.setHours(0,0,0,0),a}function Re(o,e=0){let t=O(o,e);return t.setDate(t.getDate()+6),t}function ft(o,e){return new Date(e,o,1).getDay()}function N(o=0){let e=[],t=o;do e.push(t),t+=1,t%=7;while(t!==o);return e}function He(o){return b(new Date,o)}function p(o,e,t){return o.getMonth()===e&&o.getFullYear()===t}function Ze(o,e,t){return o>e&&o<t||b(o,e)||b(o,t)}function Y(o){return o.sort((e,t)=>e.getTime()-t.getTime())}function We(o){let e=[];for(let t=0;t<o.length;t+=7){let a=o.slice(t,t+7);e.push(a)}return e}function y(o){if(!o.length)return new E;if(o.length===1)return new E({from:new Date(o[0])});let e=R(o);return new E({from:e[0],to:e[e.length-1]})}function Pe(o){let e=[];return o.from&&e.push(new Date(o.from)),o.to&&e.push(new Date(o.to)),e}function R(o){if(!o.length)return[];if(o.length===1)return[new Date(o[0])];let e=Y(o.slice().map(t=>new Date(t)));return[new Date(e[0]),new Date(e[e.length-1])]}function H(o,e,t){return!e||!t?[]:o.filter(a=>Ze(a,e,t))}function K(o){let e=`${o.length} event${o.length===1?"":"s"}`,t=o.map(a=>a.label).join(", ");return t!=null&&t.length&&(e+=`: ${t}`),e}function Je(o){var a,i;let e=new Date;return((i=(a=o.match(/-?[0-9]*[a-zA-Z]/g))==null?void 0:a.map(n=>n.trim()))!=null?i:[]).forEach(n=>{let s=n.slice(-1),u=+n.slice(0,-1);switch(s){case"y":e.setFullYear(e.getFullYear()+u);break;case"m":e.setMonth(e.getMonth()+u);break;case"w":e.setDate(e.getDate()+u*7);break;case"d":e.setDate(e.getDate()+u);break}}),e.setHours(0,0,0,0),e}function ze(o){let e=o.split(":");if((e==null?void 0:e.length)<2)return{min:1970,max:1970};let t=new Date().getFullYear(),a=e.slice(0,2).map(i=>i.startsWith("-")?t-+i.substring(1):i.startsWith("+")?t+ +i.substring(1):+i);return{min:a[0],max:a[1]}}function Ge(o){var n,s,u,_,f,j,Z,J;let e=(s=(n=o.min)==null?void 0:n.getFullYear())!=null?s:0,t=(_=(u=o.max)==null?void 0:u.getFullYear())!=null?_:0,a=(j=(f=o.min)==null?void 0:f.getMonth())!=null?j:-1,i=(J=(Z=o.max)==null?void 0:Z.getMonth())!=null?J:12;return[...Array(12).keys()].map(x=>{let $e=o.min?o.selectedYear<e||o.selectedYear===e&&x<a:!1,Xe=o.max?o.selectedYear>t||o.selectedYear===t&&x>i:!1;return{value:x,label:w(x,"long",o.locale),selected:x===o.selectedMonth,disabled:$e||Xe}})}function Ue(o){let e=[],t=o.yearInView%r.numbers.YEARS_IN_VIEW,a=o.yearInView-t;for(let i=a;i<a+r.numbers.YEARS_IN_VIEW;i++)e.push({value:i,label:m(i,"numeric",o.locale),selected:i===o.selectedYear,disabled:i<o.min||i>o.max});return e}function qe(o){let e=[];for(let t=o.min;t<=o.max;t++)e.push({value:t,label:m(t,"numeric",o.locale),selected:t===o.selectedYear});return e}function k(o,e){return e.some(t=>b(t,o))}function h(o,e){return!!(e.minDate&&o<e.minDate||e.maxDate&&o>e.maxDate||e.otherMonth||e.disabledDates.some(t=>b(t,o))||e.disabledDaysOfWeek.includes(o.getDay())||e.builder&&e.builder(o))}function S(o,e){return e.findIndex(t=>b(t,o))}function W(o,e,t){let a=e.filter(i=>b(i.date,o));if(t){let i=t(o);i&&(C(i)?a.push(...i):a.push(i))}return a}function Ve(o,e){if(!o.length)return[];let t=new Date(o[0]),a=o[o.length-1],i=[];for(;t<=a;)(!e||!h(t,e))&&i.push(new Date(t)),t.setDate(t.getDate()+1);return i}function $(o){let e=null;return typeof o=="string"&&!o.length&&(o=null),o!=null&&(B(new Date(o))?e=new Date(o):o.length&&(e=Je(o)),e==null||e.setHours(0,0,0,0)),e}function X(o,e,t){return t||!ae(o).length||!!(e==="date"&&T(o))||!!(e!=="date"&&Ye(o,r.ids.MENU))}var P=class extends ne{constructor(t){super(t);this._container=D(t,r.selectors.CALENDAR),this._dateView=D(t,r.selectors.DATE_VIEW),this._dayRow=D(t,r.selectors.DAY_ROW),this._dateGrid=D(t,r.selectors.DATE_GRID),this._menu=D(t,r.selectors.MENU)}toggleContainerAttribute(t,a,i){F(this._container,t,a,i)}registerMonthButtonListener(t){let a=this._container.querySelector(r.selectors.MONTH_BUTTON);a==null||a.addEventListener("click",t)}unregisterMonthButtonListener(t){let a=this._container.querySelector(r.selectors.MONTH_BUTTON);a==null||a.removeEventListener("click",t)}registerYearButtonListener(t){let a=this._container.querySelector(r.selectors.YEAR_BUTTON);a==null||a.addEventListener("click",t)}unregisterYearButtonListener(t){let a=this._container.querySelector(r.selectors.YEAR_BUTTON);a==null||a.removeEventListener("click",t)}registerMenuListener(t){this._menu.addEventListener(M.events.SELECT,t)}unregisterMenuListener(t){this._menu.removeEventListener(M.events.SELECT,t)}registerMenuFocusChangeEventListener(t){this._menu.addEventListener(M.events.FOCUS_CHANGE,t)}unregisterMenuFocusChangeEventListener(t){this._menu.addEventListener(M.events.FOCUS_CHANGE,t)}registerNextButtonListener(t){let a=this._container.querySelector(r.selectors.NEXT_BUTTON);a==null||a.addEventListener("click",t)}unregisterNextButtonListener(t){let a=this._container.querySelector(r.selectors.NEXT_BUTTON);a==null||a.removeEventListener("click",t)}registerPreviousButtonListener(t){let a=this._container.querySelector(r.selectors.PREVIOUS_BUTTON);a==null||a.addEventListener("click",t)}unregisterPreviousButtonListener(t){let a=this._container.querySelector(r.selectors.PREVIOUS_BUTTON);a==null||a.removeEventListener("click",t)}registerClearButtonListener(t){let a=this._container.querySelector(r.selectors.CLEAR_BUTTON);a==null||a.addEventListener("click",t)}unregisterClearButtonListener(t){let a=this._container.querySelector(r.selectors.CLEAR_BUTTON);a==null||a.removeEventListener("click",t)}registerTodayButtonListener(t){let a=this._container.querySelector(r.selectors.TODAY_BUTTON);a==null||a.addEventListener("click",t)}unregisterTodayButtonListener(t){let a=this._container.querySelector(r.selectors.TODAY_BUTTON);a==null||a.removeEventListener("click",t)}registerDateClickListener(t){this._dateGrid.addEventListener("click",t)}unregisterDateClickListener(t){this._dateGrid.removeEventListener("click",t)}registerKeydownListener(t){this._container.addEventListener("keydown",t)}registerHoverListener(t){this._dateGrid.addEventListener("mouseover",t)}unregisterHoverListener(t){this._dateGrid.removeEventListener("mouseover",t)}registerPreventFocusListener(t){this._container.addEventListener("mousedown",t)}unregisterPreventFocusListener(t){this._container.removeEventListener("mousedown",t)}setContainerClass(t,a){this._container.classList.toggle(t,a)}setHeader(){let t=this._container.querySelector(r.selectors.ACCESSIBLE_HEADER);t==null||t.remove();let a=this._container.querySelector(r.selectors.HEADER);a?a.replaceWith(G()):this._container.prepend(G())}removeHeader(){let t=this._container.querySelector(r.selectors.HEADER);t==null||t.remove();let a=this._container.querySelector(r.selectors.ACCESSIBLE_HEADER);a?a.replaceWith(U()):this._container.prepend(U())}setNextButtonDisabled(t){let a=this._container.querySelector(r.selectors.NEXT_BUTTON);a==null||a.toggleAttribute("disabled",t)}setPreviousButtonDisabled(t){let a=this._container.querySelector(r.selectors.PREVIOUS_BUTTON);a==null||a.toggleAttribute("disabled",t)}setNextButtonLabel(t){let a=this._container.querySelector(r.selectors.NEXT_BUTTON);a==null||a.setAttribute("aria-label",t);let i=this._container.querySelector(r.selectors.NEXT_BUTTON_TOOLTIP);i&&(i.innerHTML=t)}setPreviousButtonLabel(t){let a=this._container.querySelector(r.selectors.PREVIOUS_BUTTON);a==null||a.setAttribute("aria-label",t);let i=this._container.querySelector(r.selectors.PREVIOUS_BUTTON_TOOLTIP);i&&(i.innerHTML=t)}setMonthButtonPressed(t){let a=this._container.querySelector(r.selectors.MONTH_BUTTON);a&&(a.setAttribute("aria-pressed",t.toString()),this._container.classList.toggle(r.classes.MONTH_MENU_OPEN,t))}setYearButtonPressed(t){let a=this._container.querySelector(r.selectors.YEAR_BUTTON);a&&(a.setAttribute("aria-pressed",t.toString()),this._container.classList.toggle(r.classes.YEAR_MENU_OPEN,t))}setMonth(t,a){let i=this._container.querySelector(r.selectors.MONTH_BUTTON);if(i){let s=Be(t,a);i.replaceChildren(s[0],s[1]);return}let n=this._container.querySelector(r.selectors.ACCESSIBLE_MONTH);n&&(n.textContent=w(t,"long",a))}setYear(t,a){let i=this._container.querySelector(r.selectors.YEAR_BUTTON);if(i){let s=Ie(t,a);i.replaceChildren(s[0],s[1]);return}let n=this._container.querySelector(r.selectors.ACCESSIBLE_YEAR);n&&(n.textContent=m(t,"numeric",a))}setFooter(){this._container.querySelector(r.selectors.FOOTER)||this._container.appendChild(Le())}removeFooter(){var a;let t=this._container.querySelector(r.selectors.FOOTER);(a=t==null?void 0:t.parentNode)==null||a.removeChild(t)}setClearButton(){let t=this._container.querySelector(r.selectors.FOOTER);if(!t)return;t.querySelector(r.selectors.CLEAR_BUTTON)||t.prepend(Fe())}removeClearButton(){var a;let t=this._container.querySelector(r.selectors.CLEAR_BUTTON);(a=t==null?void 0:t.parentNode)==null||a.removeChild(t)}setTodayButton(){let t=this._container.querySelector(r.selectors.FOOTER);if(!t)return;t.querySelector(r.selectors.TODAY_BUTTON)||t.appendChild(Ne())}removeTodayButton(){var a;let t=this._container.querySelector(r.selectors.TODAY_BUTTON);(a=t==null?void 0:t.parentNode)==null||a.removeChild(t)}setDays(t,a){L(this._dayRow),t.forEach(i=>{let n=xe(i,a==null?void 0:a.locale);a!=null&&a.builder&&(n=a.builder(i,n)),this._dayRow.appendChild(n)})}setDates(t,a){L(this._dateGrid),We(t).forEach((i,n)=>{let s=Ce(i,n,a);this._dateGrid.appendChild(s)})}replaceDate(t,a){let i=this._dateGrid.querySelector(`#${v(t.date)}`);if(i){let n=Me(t,a==null?void 0:a.locale);a!=null&&a.builder?i.replaceWith(a.builder(t,n)):i.replaceWith(n)}}replaceDateWithSpacer(t){let a=this._dateGrid.querySelector(`#${v(t)}`);a==null||a.replaceWith(Te(t))}setDateDisabled(t,a){let i=this._dateGrid.querySelector(`#${v(t)}`);i&&(i.toggleAttribute("disabled",a),i.setAttribute("aria-disabled",a.toString()))}setDateSelected(t,a){let i=this._dateGrid.querySelector(`#${v(t)}`);i&&(i.classList.toggle(r.classes.DATE_SELECTED,a),i.setAttribute("aria-selected",a.toString()))}setWeekend(t,a){let i=this._dateGrid.querySelector(`#${v(t)}`),n=i==null?void 0:i.querySelector(r.selectors.DATE_INNER);n&&ee(n,"part",r.parts.WEEKEND,a)}appendDateAttribute(t,a,i){let n=this._dateGrid.querySelector(`#${v(t)}`);n&&te(n,a,i)}setMultiple(t){this._dateView.setAttribute("aria-multiselectable",t.toString())}setDateViewHidden(t){F(this._dateView,t,"aria-hidden",t.toString()),this.setAllDatesUnfocusable()}setRange(t){this._dateGrid.querySelectorAll(r.selectors.RANGE).forEach(i=>i.classList.remove(r.classes.RANGE)),t&&t.forEach(i=>{let n=this._dateGrid.querySelector(`#${v(i)}`);n==null||n.classList.add(r.classes.RANGE)})}setRangeStart(t){let a=this._dateGrid.querySelector(r.selectors.RANGE_START);if(a==null||a.classList.remove(r.classes.RANGE_START),!t)return;let i=this._dateGrid.querySelector(`#${v(t)}`);i==null||i.classList.add(r.classes.RANGE_START)}setRangeEnd(t){let a=this._dateGrid.querySelector(r.selectors.RANGE_END);if(a==null||a.classList.remove(r.classes.RANGE_END),!t)return;let i=this._dateGrid.querySelector(`#${v(t)}`);i==null||i.classList.add(r.classes.RANGE_END)}setActiveDate(t,a,i){let n=t.toDateString();this._dateGrid.querySelectorAll(r.selectors.DATE).forEach(u=>{let _=u.getAttribute(r.attributes.DATA_DATE)===n;q(u,_?0:-1,a,i)})}setAllDatesUnfocusable(){this._dateGrid.querySelectorAll(r.selectors.DATE).forEach(a=>q(a,-1,!1,!0))}setDateDescription(t,a){let i=this._dateGrid.querySelector(`#${v(t)}`);i&&F(i,!!a,a)}setDateTooltip(t,a){let i=this._dateGrid.querySelector(`#${v(t)}`);if(!i)return;let n=i.querySelector(r.selectors.TOOLTIP);n?a!=null&&a.length?n.textContent=a:n.remove():a!=null&&a.length&&i.prepend(Ae(a))}setEventWrapperOnDate(t,a){let i=this._dateGrid.querySelector(`#${v(t)}`);if(!i)return;let n=i.querySelector(r.selectors.EVENT_WRAPPER);n?a?L(n):n.remove():a&&i.appendChild(Oe(t))}setEvent(t,a){let i=this._dateGrid.querySelector(`#${ke(t.date)}`);i==null||i.appendChild(Se(t,a))}openMenuAsGrid(t,a){this._menu.openAsGrid(t,a)}openMenuAsList(t,a){this._menu.openAsList(t,a)}closeMenu(){this._menu.close()}setMenuAnimation(t){this._menu.animationType=t}animateIntoSelectionMenu(t,a,i){this._menu.animateIn(t,a,i)}moveMenuFocusDown(){this._menu.moveFocusDown()}moveMenuFocusBackward(){return this._menu.moveFocusBackward()}moveMenuFocusForward(){return this._menu.moveFocusForward()}moveMenuFocusUp(){this._menu.moveFocusUp()}selectFocusedMenuItem(){this._menu.selectFocusedItem()}setPreventFocusOnMenu(t){this._menu.preventFocus=t}};var z=class{constructor(e){this._adapter=e;this._dates=[];this._month=new Date().getMonth();this._year=new Date().getFullYear();this._showToday=!0;this._showOtherMonths=!1;this._fixedHeight=!1;this._events=[];this._value=[];this._mode="single";this._readonly=!1;this._selectionFollowsMonth=!1;this._rangeSelectionState="none";this._allowSingleDateRange=!0;this._min=null;this._max=null;this._minAttribute=null;this._maxAttribute=null;this._disabledDates=[];this._disabledDaysOfWeek=[];this._constrainToEnabled=!0;this._showHeader=!0;this._clearButton=!1;this._todayButton=!1;this._view="date";this._menuAnimation="scale";this._menuYear=null;this._listYears=!0;this._menuIncludedYear=new Date().getFullYear();this._menuYearsInView=null;this._yearRange=`-${r.numbers.DEFAULT_MIN_YEAR_OFFSET}:+${r.numbers.DEFAULT_MAX_YEAR_OFFSET}`;this._weekendDays=null;this._localeFirstDayOfWeek=0;this._localeWeekendDays=[];this._rtl=!1;this._preventFocus=!1;this._isInitialized=!1;this._clearButtonListener=()=>this._onClearClicked(),this._dateClickListener=t=>this._onDateClick(t),this._keydownListener=t=>this._onKeydown(t),this._hoverListener=t=>this._onHover(t),this._menuFocusChangeListener=t=>this._onMenuFocusChange(t),this._menuListener=t=>this._onMenuSelect(t),this._monthButtonListener=()=>this._onMonthButtonClicked(),this._nextButtonListener=()=>this._onNextButtonClicked(),this._preventFocusListener=t=>t.preventDefault(),this._previousButtonListener=()=>this._onPreviousButtonClicked(),this._todayButtonListener=()=>this._onTodayClicked(),this._yearButtonListener=()=>this._onYearButtonClicked()}initialize(){this._adapter.registerMenuListener(this._menuListener),this._adapter.registerMenuFocusChangeEventListener(this._menuFocusChangeListener),this._adapter.registerKeydownListener(this._keydownListener),this._applyMin(),this._applyMax(),this._applyFixedHeight(),this._applyReadOnly(),this._applyShowToday(),this._applyPreventFocus(),this._applyShowHeader(),this._applyMonth(),this._applyYear(),this._applyListYears(),this._applyMenuAnimation(),this._applyLocale(),this._applyClearButton(),this._applyTodayButton(),this._applyFirstDayOfWeek(),this._applyShowOtherMonths(),this._createDateView(),this._applyConstrainToEnabled(),this._applyAllowSingleDateRange(),this._applyMode(),this._applyYearRange(),this._applySelectionFollowsMonth(),this._isInitialized=!0}disconnect(){this._isInitialized=!1}_onMonthButtonClicked(){this._toggleMonthMenu()}_toggleMonthMenu(e=!1){this._view!=="month"?this._openMonthMenu(e):this._closeMenu(!1,e)}_onYearButtonClicked(){this._toggleYearMenu()}_toggleYearMenu(e=!1){this._view!=="year"?this._openYearMenu(e):this._closeMenu(!1,e)}_onMenuFocusChange(e){this._emitFocusChangeEvent(e.detail)}_onMenuSelect(e){switch(this._view){case"month":this._onMonthSelected(e.detail);break;case"year":this._onYearSelected(e.detail);break}}_onNextButtonClicked(){this._view==="date"?(this._goToNextMonth(),this._setFocusInMonth(1,!1)):this._view==="month"?this._goToNextYear():this._goToNextSetOfYears()}_onPreviousButtonClicked(){this._view==="date"?(this._goToPreviousMonth(),this._setFocusInMonth(2,!1)):this._view==="month"?this._goToPreviousYear():this._goToPreviousSetOfYears()}_onHover(e){if(this._mode==="range"){let t=T(e,!1);if(!t)return;let a=new Date(Date.parse(t.getAttribute(r.attributes.DATA_DATE)));p(a,this._month,this._year)&&this._setRangePreview(a)}}_onDateClick(e){let t=T(e,!1);if(!t)return;let a=t.getAttribute(r.attributes.DATA_DATE);if(!a)return;let i=new Date(a);p(i,this._month,this._year)&&(this._focusedDate=i,this._beforeDateSelected(i)),this._resumeTabindexOnDate(!1)}_onKeydown(e){switch(e.key){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":this._handleArrowKey(e);break;case"Home":case"End":case"PageUp":case"PageDown":this._handleNavigationKey(e);break;case" ":case"Enter":this._handleEnterOrSpaceKey(e);break;case"m":case"M":e.preventDefault(),this._toggleMonthMenu(!0);break;case"y":case"Y":e.preventDefault(),this._toggleYearMenu(!0);break;case"t":case"T":case"n":case"N":e.preventDefault(),this.today();break;case"Delete":case"Backspace":e.preventDefault(),this._deselectAllDates();break;case"Escape":this._view!=="date"&&(e.preventDefault(),e.stopPropagation(),this._closeMenu(!1,!0));break}}_handleArrowKey(e){if(!X(e,this._view,this._preventFocus))return;e.preventDefault();let t;switch(e.key){case"ArrowLeft":t=this._rtl?"next":"previous";break;case"ArrowRight":t=this._rtl?"previous":"next";break;case"ArrowUp":t="up";break;case"ArrowDown":t="down";break}switch(t){case"previous":this._view==="date"?this._moveFocusToPreviousDate(!0):!this._adapter.moveMenuFocusBackward()&&this._canGoBackward()&&(this._view==="month"?this._goToPreviousYear(!0):this._goToPreviousSetOfYears(!0));break;case"next":this._view==="date"?this._moveFocusToNextDate(!0):!this._adapter.moveMenuFocusForward()&&this._canGoForward()&&(this._view==="month"?this._goToNextYear(!0):this._goToNextSetOfYears(!0));break;case"up":this._view==="date"?this._moveFocusToPreviousWeek(!0):this._adapter.moveMenuFocusUp();break;case"down":this._view==="date"?this._moveFocusToNextWeek(!0):this._adapter.moveMenuFocusDown();break}this._mode==="range"&&this._setRangePreview(this._focusedDate)}_handleNavigationKey(e){switch(e.preventDefault(),e.key){case"Home":if(this._view!=="date")break;e.shiftKey?this._moveFocusToFirstOfMonth(!0):this._moveFocusToFirstOfWeek(!0);break;case"End":if(this._view!=="date")break;e.shiftKey?this._moveFocusToLastOfMonth(!0):this._moveFocusToLastOfWeek(!0);break;case"PageUp":this._view==="date"?e.shiftKey?this._moveFocusToPreviousYear(!0):this._moveFocusToPreviousMonth(!0):this._view==="month"&&!e.shiftKey&&this._canGoBackward()?this._goToPreviousYear(!0):this._view==="year"&&!e.shiftKey&&this._canGoBackward()&&this._goToPreviousSetOfYears(!0);break;case"PageDown":this._view==="date"?e.shiftKey?this._moveFocusToNextYear(!0):this._moveFocusToNextMonth(!0):this._view==="month"&&!e.shiftKey&&this._canGoForward()?this._goToNextYear(!0):this._view==="year"&&!e.shiftKey&&this._canGoForward()&&this._goToNextSetOfYears(!0);break}}_handleEnterOrSpaceKey(e){if(X(e,this._view,this._preventFocus))switch(e.preventDefault(),this._view){case"date":if(this._readonly)break;this._setSelectOnFocusedDate();break;case"month":case"year":this._adapter.selectFocusedMenuItem();break}}_onMonthSelected(e){this._year!==this._menuYear&&this._menuYear!=null&&(this._year=this._menuYear,this._setYear()),this._month=e,this._setMonth(!0),this._trySetValueMonthAndYear(this._month,this._year,"month"),this._closeMenu(!0)}_onYearSelected(e){this._year=e,this._setYear(!0),this._trySetValueMonthAndYear(this._month,this._year,"year"),this._closeMenu(!0)}_onClearClicked(){this.clear()}_onTodayClicked(){this.today()}_trySetValueMonthAndYear(e,t,a="date"){var s;if(!this.selectionFollowsMonth||this._mode!=="single"||!((s=this._value)!=null&&s.length))return;let i=new Date(this._value[0]),n=_e(e,t);i.setDate(Math.min(i.getDate(),n)),i.setFullYear(t),i.setMonth(e),!h(i,this._getDisabledDateParams())&&this._beforeDateSelected(i,a)}_setInitialDateFocus(e=!1){let t=new Date;if(p(t,this._month,this._year)&&!h(t,this._getDisabledDateParams(!1))){this._setFocusedDate(t,e);return}let a=new Date(this._year,this._month,1);this._setFocusedDate(this._getNextEnabledDate(a,1,!1,!0,!0),e)}_resumeTabindexOnDate(e){return p(this._focusedDate,this._month,this._year)?(this._adapter.setActiveDate(this._focusedDate,e,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate),!0):!1}_moveFocusToNextDate(e){this._setFocusedDate(this._getNextEnabledDate(this._focusedDate),e)}_moveFocusToPreviousDate(e){this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate),e)}_moveFocusToNextWeek(e){this._setFocusedDate(this._getNextEnabledDate(this._focusedDate,7,!0),e)}_moveFocusToPreviousWeek(e){this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate,7,!0),e)}_moveFocusToFirstOfWeek(e){this._setFocusedDate(this._getFirstEnabledDayOfWeek(this._focusedDate,!0),e)}_moveFocusToLastOfWeek(e){this._setFocusedDate(this._getLastEnabledDayOfWeek(this._focusedDate,!0),e)}_moveFocusToFirstOfMonth(e){let t=new Date(this._year,this._month,1);this._setFocusedDate(this._getNextEnabledDate(t,1,!1,!0),e)}_moveFocusToLastOfMonth(e){let t=new Date(this._year,this._month+1,0);this._setFocusedDate(this._getPreviousEnabledDate(t,1,!1,!0),e)}_moveFocusToNextMonth(e){let t=S(this._focusedDate,this._dates),a=(this._month+1)%12,i=a===0?this._year+1:this._year;this._setFocusedDate(this._getDateAtIndexInMonth(t,a,i),e)}_moveFocusToPreviousMonth(e){let t=S(this._focusedDate,this._dates),a=this._month===0?11:this._month-1,i=a===11?this._year-1:this._year;this._setFocusedDate(this._getDateAtIndexInMonth(t,a,i),e)}_moveFocusToNextYear(e){let t=S(this._focusedDate,this._dates);this._setFocusedDate(this._getDateAtIndexInMonth(t,this._month,this._year+1),e)}_moveFocusToPreviousYear(e){let t=S(this._focusedDate,this._dates);this._setFocusedDate(this._getDateAtIndexInMonth(t,this._month,this._year-1),e)}_setFocusInMonth(e,t){switch(e){case 1:this._moveFocusToFirstOfMonth(t);break;case 2:this._moveFocusToLastOfMonth(t);break;default:this._resumeTabindexOnDate(t);break}}_setSelectOnFocusedDate(){p(this._focusedDate,this._month,this._year)&&!h(this._focusedDate,this._getDisabledDateParams(!1))&&this._beforeDateSelected(this._focusedDate)}_emitFocusChangeEvent(e){let t={type:this._view,value:e};switch(this._view){case"date":t.selected=k(e,this._value),t.text=e.toLocaleDateString(this.locale,{month:"long",day:"2-digit",year:"numeric"});break;case"month":t.selected=this._month===e,t.text=w(e,"long");break;case"year":t.selected=this._year===e,t.text=m(e,"numeric");break}this._adapter.emitHostEvent(r.events.FOCUS_CHANGE,t)}_getPreviousEnabledDate(e,t=1,a=!1,i=!1,n=!1){let s=this._getDisabledDateParams(),u=new Date(e);if(i&&!h(u,s))return u;let _=e.getMonth(),f=!1;do u.setDate(u.getDate()-t),a&&(t=1),(n&&u.getMonth()!==_||this._min&&u<this._min)&&(f=!0);while(!f&&h(u,s));return f?null:u}_getNextEnabledDate(e,t=1,a=!1,i=!1,n=!1){let s=this._getDisabledDateParams(),u=new Date(e);if(i&&!h(u,s))return u;let _=e.getMonth(),f=!1;do u.setDate(u.getDate()+t),a&&(t=1),(n&&u.getMonth()!==_||this._max&&u>this._max)&&(f=!0);while(!f&&h(u,s));return f?null:u}_getClosestEnabledDate(e,t=!1,a=!1){if(this._min&&e<this._min)return this._getFirstEnabledDate();if(this._max&&e>this._max)return this._getLastEnabledDate();let i=this._getDisabledDateParams();if(a&&!h(e,i))return new Date(e);let n=e.getDate(),s,u=!1,_=!1,f=1;for(;!u||!_;){if(!u){if(s=new Date(e),s.setDate(n+f),u=!p(s,e.getMonth(),e.getFullYear()),!u&&!h(s,i))return s;this._max&&s>this._max&&(u=!0)}if(!_){if(s=new Date(e),s.setDate(n-f),_=!p(s,e.getMonth(),e.getFullYear()),!_&&!h(s,i))return s;this._min&&s<this._min&&(_=!0)}f+=1}return null}_getFirstEnabledDayOfWeek(e,t=!0){let a=O(e),i=this._getDisabledDateParams(t?a.getMonth()!==e.getMonth()||a.getFullYear()!==e.getFullYear():void 0),n=0;for(;n<7&&h(a,i);)a.setDate(a.getDate()+1),i.otherMonth=t?a.getMonth()!==e.getMonth()||a.getFullYear()!==e.getFullYear():void 0,n+=1;return n<7?a:null}_getLastEnabledDayOfWeek(e,t=!0){let a=Re(e),i=this._getDisabledDateParams(t?a.getMonth()!==e.getMonth()||a.getFullYear()!==e.getFullYear():void 0),n=0;for(;n<7&&h(a,i);)a.setDate(a.getDate()-1),i.otherMonth=t?a.getMonth()!==e.getMonth()||a.getFullYear()!==e.getFullYear():void 0,n+=1;return n<7?a:null}_getDateAtIndexInMonth(e,t,a){var n;let i=V(t,a,(n=this._firstDayOfWeek)!=null?n:this._localeFirstDayOfWeek);return this._min&&i[e]<this._min?this._getFirstEnabledDate():this._max&&i[e]>this._max?this._getLastEnabledDate():p(i[e],t,a)?this._getClosestEnabledDate(i[e],!0):e<20?this._getNextEnabledDate(i[e],7,!0):this._getPreviousEnabledDate(i[e],7,!0)}_getFirstEnabledDate(){return this._min?this._getNextEnabledDate(this._min,1,!1,!0):null}_getLastEnabledDate(){return this._max?this._getPreviousEnabledDate(this._max,1,!1,!0):null}_setFocusedDate(e,t){if(!e)return;let a=this._month!==e.getMonth(),i=this._year!==e.getFullYear();(a||i)&&(a&&(this._month=e.getMonth(),this._setMonth()),i&&(this._year=e.getFullYear(),this._setYear()),this._resetDateGrid()),this._focusedDate=e,this._adapter.setActiveDate(this._focusedDate,t,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate)}_getDisabledDateParams(e){return{builder:this._disabledDateBuilder,disabledDates:this._disabledDates,disabledDaysOfWeek:this._disabledDaysOfWeek,maxDate:this._max,minDate:this._min,otherMonth:e}}_createDateView(){this._resetDateGrid(),(!this._focusedDate||!this._resumeTabindexOnDate(!1))&&this._setInitialDateFocus()}_openMonthMenu(e=!1){this._view="month",this._menuYear==null&&(this._menuYear=this._year),this._showHeader&&(this._setNavButtonLabels(),this._adapter.setMonthButtonPressed(!0),this._adapter.setYearButtonPressed(!1)),this._adapter.openMenuAsGrid(this._getMonthsForMenu(),e),this._adapter.setDateViewHidden(!0),this._setNavigationButtonStates(),this._adapter.emitHostEvent(r.events.VIEW_CHANGE,this._view)}_openYearMenu(e=!1){var t;this._view="year",this._menuIncludedYear=(t=this._menuYear)!=null?t:this._year,this._showHeader&&(this._setNavButtonLabels(),this._adapter.setMonthButtonPressed(!1),this._adapter.setYearButtonPressed(!0)),this._listYears?this._adapter.openMenuAsList(this._getYearsForMenu(),e):this._adapter.openMenuAsGrid(this._getYearsForMenu(),e),this._adapter.setDateViewHidden(!0),this._setNavigationButtonStates(),this._adapter.emitHostEvent(r.events.VIEW_CHANGE,this._view)}_getMonthsForMenu(){var t;let e={locale:this._locale,max:this._max,min:this._min,selectedMonth:this._year===this._menuYear?this._month:-1,selectedYear:(t=this._menuYear)!=null?t:this._year};return Ge(e)}_getYearsForMenu(){let e=this._min?this._min.getFullYear():this._minYear,t=this._max?this._max.getFullYear():this._maxYear,a={locale:this._locale,max:t,min:e,selectedYear:this._year,yearInView:this._menuIncludedYear},i=this._listYears?qe(a):Ue(a);return this._menuYearsInView={min:i[0].value,max:i[i.length-1].value},i}_closeMenu(e,t=!1){this._view="date",this._menuYear=null,this._adapter.closeMenu(),this._adapter.setDateViewHidden(!1),this._adapter.setYear(this._year,this._locale),e&&this._resetDateGrid(),this._showHeader&&(this._setNavButtonLabels(),this._setNavigationButtonStates(),this._adapter.setMonthButtonPressed(!1),this._adapter.setYearButtonPressed(!1)),this._resumeTabindexOnDate(t)||this._setInitialDateFocus(t),this._adapter.emitHostEvent(r.events.VIEW_CHANGE,this._view)}_setNavButtonLabels(){switch(this._view){case"date":this._adapter.setPreviousButtonLabel("Previous month"),this._adapter.setNextButtonLabel("Next month");break;case"month":this._adapter.setPreviousButtonLabel("Previous year"),this._adapter.setNextButtonLabel("Next year");break;case"year":this._adapter.setPreviousButtonLabel("Previous years"),this._adapter.setNextButtonLabel("Next years");break}}_resetDateGrid(){var t;this._dates=V(this._month,this._year,(t=this._firstDayOfWeek)!=null?t:this._localeFirstDayOfWeek);let e=this._dates.map(a=>this._getDateConfig(a));this._adapter.setDates(e,{builder:this._dateBuilder,locale:this._locale,showOtherMonths:this._showOtherMonths}),this._setNavigationButtonStates(),this._applyWeekendDays(),this._applyEvents(),this._mode==="range"&&(this._adapter.setRangeStart(this._value[0]),this._setRangePreview())}_getDateConfig(e){let t=p(e,this._month,this._year);return{date:new Date(e),selected:k(e,this._value),today:He(e),thisMonth:t,disabled:h(e,this._getDisabledDateParams(!t))}}_getCalendarDate(e){return{date:new Date(e),selected:k(e,this._value),events:W(e,this._events,this._eventBuilder)}}_setEventsOnDate(e){var i;if(!this._showOtherMonths&&!p(e,this._month,this._year)){this._adapter.setEventWrapperOnDate(e,!1);return}let t=W(e,this._events,this._eventBuilder);this._adapter.setEventWrapperOnDate(e,!!t.length),t.forEach((n,s)=>{s>2||this._adapter.setEvent(n,s===2&&t.length>3)});let a=t.length?K(t):"";this._tooltipBuilder&&(a=(i=this._tooltipBuilder(this._getCalendarDate(e),a))!=null?i:""),this._adapter.setDateTooltip(e,a)}_beforeDateSelected(e,t="date"){this._dateSelectCallback?Promise.resolve(this._dateSelectCallback(this._getCalendarDate(e))).then(a=>{a&&this._onDateSelected(e,void 0,t)}):this._onDateSelected(e,void 0,t)}_onDateSelected(e,t,a="date"){if(this._mode==="range"&&this._emitRangeSelectionEvent(e)){this._applyRangeSelection(e),this._rangeSelectionStore=void 0;return}let i=k(e,this._value),n={date:new Date(e),selected:i,type:a};this._adapter.emitHostEvent(r.events.DATE_SELECT,n,!0,!0)&&(this._rangeSelectionStore=void 0,this._mode==="single"?i&&!t||t===!1?this._deselectDate(e):(t===void 0||t===!0)&&(this._value.length&&this._deselectDate(this._value[0]),this._selectDate(e)):i&&!t||t===!1?this._deselectDate(e):(t===void 0||t===!0)&&this._selectDate(e),Y(this._value))}_emitRangeSelectionEvent(e){let t={date:new Date(e),selected:k(e,this._value),type:"date"};switch(this._rangeSelectionState){case"none":case"to":t.range=y([e]),t.rangeSelectionState="from";break;case"from":b(e,this._value[0])?this._allowSingleDateRange?(t.range=y([this._value[0],e]),t.rangeSelectionState="to"):(t.range=y([]),t.rangeSelectionState="none"):e<this._value[0]?(t.range=y([e]),t.rangeSelectionState="from"):(t.range=y([this._value[0],e]),t.rangeSelectionState="to");break}return this._adapter.emitHostEvent(r.events.DATE_SELECT,t,!0,!0)}_applyRangeSelection(e){switch(this._rangeSelectionState){case"none":case"to":this._deselectAllDates(),this._selectDate(e),this._adapter.setRange(null),this._adapter.setRangeStart(e),this._rangeSelectionState="from";break;case"from":b(e,this._value[0])?this._allowSingleDateRange?(this._value.push(e),this._rangeSelectionState="to"):(this._deselectDate(e),this._rangeSelectionState="none"):e<this._value[0]?(this._deselectDate(this._value[0]),this._selectDate(e),this._adapter.setRangeStart(e)):(this._selectDate(e),this._setRangePreview(e),this._rangeSelectionState="to");break}}_setRangePreview(e){switch(this._rangeSelectionState){case"from":if(!e)return;e<this._value[0]?this._adapter.setRange(null):(this._adapter.setRange(H(this._dates,this._value[0],e)),this._adapter.setRangeEnd(e));break;case"to":this._adapter.setRange(H(this._dates,this._value[0],this._value[1])),this._adapter.setRangeEnd(this._value[1]);break}}_clearRangePreview(){this._adapter.setRange(null),this._adapter.setRangeStart(null),this._adapter.setRangeEnd(null)}_selectDate(e){this._value.push(e),this._focusedDate=e,this._adapter.setDateSelected(e,!0)}_deselectDate(e){let t=this._value.findIndex(a=>b(a,e));t>-1&&this._value.splice(t,1),this._adapter.setDateSelected(e,!1)}_deselectAllDates(){this._value.forEach(e=>this._adapter.setDateSelected(e,!1)),this._clearRangePreview(),this._value=[]}_goToDate(e,t){let a=e.getFullYear(),i=e.getMonth();this._focusedDate=e,this._year!==a||this._month!==i?(this._month=i,this._setMonth(),this._year=a,this._setYear(),this._view!=="date"?this._closeMenu(!1,t):this._resetDateGrid()):this._view!=="date"&&this._closeMenu(!1,t),this._adapter.setActiveDate(e,t,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate)}_goToNextMonth(){this._month<11?this._month+=1:(this._month=0,this._year+=1,this._setYear()),this._setMonth(),this._resetDateGrid()}_goToPreviousMonth(){this._month>0?this._month-=1:(this._month=11,this._year-=1,this._setYear()),this._setMonth(),this._resetDateGrid()}_goToNextYear(e=!1){this._view==="month"?(this._menuYear&&(this._menuYear+=1,this._setMenuYear()),this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(),this._rtl?"left":"right",e)):(this._year+=1,this._setYear(),this._resetDateGrid())}_goToPreviousYear(e=!1){this._view==="month"?(this._menuYear&&(this._menuYear-=1,this._setMenuYear()),this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(),this._rtl?"right":"left",e)):(this._year-=1,this._setYear(),this._resetDateGrid())}_goToNextSetOfYears(e=!1){this._menuIncludedYear+=r.numbers.YEARS_IN_VIEW,this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(),this._rtl?"left":"right",e),this._setNavigationButtonStates()}_goToPreviousSetOfYears(e=!1){this._menuIncludedYear-=r.numbers.YEARS_IN_VIEW,this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(),this._rtl?"right":"left",e),this._setNavigationButtonStates()}_canGoBackward(e){var t;if(!e&&!this._constrainToEnabled)return!0;switch(this._view){case"date":return!this._min||this._min<new Date(this._year,this._month,1);case"month":let a=(t=this._min)==null?void 0:t.getFullYear();return this._menuYear!=null&&(a==null||a<this._menuYear);case"year":return!!this._menuYearsInView&&this._minYear<this._menuYearsInView.min;default:return!1}}_canGoForward(e){var t;if(!e&&!this._constrainToEnabled)return!0;switch(this._view){case"date":return!this._max||this._max>he(this._month,this._year);case"month":let a=(t=this._max)==null?void 0:t.getFullYear();return this._menuYear!=null&&(a==null||a>this._menuYear);case"year":return!!this._menuYearsInView&&this._maxYear>this._menuYearsInView.max;default:return!1}}_setNavigationButtonStates(){if(this._showHeader){if(!this._constrainToEnabled){this._adapter.setPreviousButtonDisabled(!1),this._adapter.setNextButtonDisabled(!1);return}this._adapter.setPreviousButtonDisabled(!this._canGoBackward()),this._adapter.setNextButtonDisabled(!this._canGoForward())}}_setMonth(e){this._adapter.setMonth(this._month,this._locale),this._adapter.setHostAttribute(r.attributes.MONTH,this._month.toString()),this._isInitialized&&(this._setNavigationButtonStates(),this._adapter.emitHostEvent(r.events.MONTH_CHANGE,{month:this._month,userSelected:e!=null?e:!1,year:this._year}))}_setYear(e){this._adapter.setYear(this._year,this._locale),this._adapter.setHostAttribute(r.attributes.YEAR,this._year.toString()),this._isInitialized&&(this._setNavigationButtonStates(),this._adapter.emitHostEvent(r.events.MONTH_CHANGE,{month:this._month,userSelected:e!=null?e:!1,year:this._year}))}_setMenuYear(){this._menuYear!=null&&(this._setNavigationButtonStates(),this._adapter.setYear(this._menuYear,this._locale))}_applyAllowSingleDateRange(){this._adapter.toggleHostAttribute(r.attributes.ALLOW_SINGLE_DATE_RANGE,this._allowSingleDateRange),this._adapter.setContainerClass(r.classes.ALLOW_SINGLE_DATE_RANGE,this._allowSingleDateRange)}_applyClearButton(){this._adapter.toggleHostAttribute(r.attributes.CLEAR_BUTTON,!0,this._clearButton.toString()),this._clearButton?(this._adapter.setFooter(),this._adapter.setClearButton(),this._adapter.registerClearButtonListener(this._clearButtonListener)):(this._adapter.unregisterClearButtonListener(this._clearButtonListener),this._adapter.removeClearButton(),this._todayButton||this._adapter.removeFooter())}_applyConstrainToEnabled(){this._adapter.toggleHostAttribute(r.attributes.CONSTRAIN_TO_ENABLED,!0,this._constrainToEnabled.toString()),this._isInitialized&&this._setNavigationButtonStates()}_applyDateBuilder(){this._view==="date"&&(this._resetDateGrid(),this._resumeTabindexOnDate(!1))}_applyDayBuilder(){var e;this._adapter.setDays(N((e=this._firstDayOfWeek)!=null?e:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale})}_applyDisabledDates(){switch(this._view){case"date":this._dates.forEach(e=>{let t=p(e,this._month,this._year),a=this._getDisabledDateParams(!t);this._adapter.setDateDisabled(e,h(e,a))});break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}this._setNavigationButtonStates()}_applyEvents(){this._view==="date"&&this._dates.forEach(e=>{this._setEventsOnDate(e)})}_applyFirstDayOfWeek(){var e,t;this._adapter.toggleHostAttribute(r.attributes.FIRST_DAY_OF_WEEK,A(this._firstDayOfWeek),((e=this._firstDayOfWeek)!=null?e:0).toString()),this._adapter.setDays(N((t=this._firstDayOfWeek)!=null?t:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale}),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._resumeTabindexOnDate(!1))}_applyFixedHeight(){this._adapter.toggleHostAttribute(r.attributes.FIXED_HEIGHT,this._fixedHeight),this._adapter.setContainerClass(r.classes.FIXED_HEIGHT,this._fixedHeight)}_applyListYears(){this._adapter.toggleHostAttribute(r.attributes.LIST_YEARS,this._listYears),this._isInitialized&&this._view==="year"&&this._openYearMenu()}_applyLocale(){var e;if(this._adapter.toggleHostAttribute(r.attributes.LOCALE,!!this._locale,this._locale),this._adapter.toggleContainerAttribute(!!this._locale,"lang",this._locale),this._localeFirstDayOfWeek=De(this._locale),this._localeWeekendDays=we(this._locale),this._applyRtl(),this._isInitialized)switch(this._adapter.setMonth(this._month,this._locale),this._adapter.setYear(this._year,this._locale),this._view){case"date":this._adapter.setDays(N((e=this._firstDayOfWeek)!=null?e:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale}),this._resetDateGrid(),this._resumeTabindexOnDate(!1);break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}}_applyMenuAnimation(){this._adapter.setHostAttribute(r.attributes.MENU_ANIMATION,this._menuAnimation),this._adapter.setMenuAnimation(this._menuAnimation)}_applyMin(){if(this._adapter.toggleHostAttribute(r.attributes.MIN,!!this._minAttribute,this._minAttribute),this._isInitialized&&(this._applyDisabledDates(),this._min&&this._min>this._focusedDate)){let e=this._getFirstEnabledDate();e&&this._goToDate(e,!1)}}_applyMax(){if(this._adapter.toggleHostAttribute(r.attributes.MAX,!!this._maxAttribute,this._maxAttribute),this._isInitialized&&(this._applyDisabledDates(),this._max&&this._max<this._focusedDate)){let e=this._getLastEnabledDate();e&&this._goToDate(e,!1)}}_applyMode(e){switch(this._mode){case"single":this._applySingleMode();break;case"multiple":this._applyMultipleMode(e==="range");break;case"range":this._applyRangeMode();break}this._mode!=="range"&&(this._rangeSelectionState="none",this._adapter.unregisterHoverListener(this._hoverListener),this._clearRangePreview())}_applySingleMode(){if(this._adapter.setHostAttribute(r.attributes.MODE,"single"),this._adapter.setMultiple(!1),this._value.length>1)for(let e=this._value.length-2;e>=0;e-=1)this._deselectDate(this._value[e])}_applyMultipleMode(e=!1){if(this._adapter.setHostAttribute(r.attributes.MODE,"multiple"),this._adapter.setMultiple(!0),e){let t=Ve(this._value,this._getDisabledDateParams());this._deselectAllDates(),t.forEach(a=>{this._selectDate(a)})}}_applyRangeMode(){var t,a;this._adapter.setHostAttribute(r.attributes.MODE,"range"),this._adapter.setMultiple(!1);let e=R(this._value);this._deselectAllDates(),e.forEach(i=>{this._selectDate(i)}),this._rangeSelectionState=this._value[0]?this._value[1]?"to":"from":"none",this._adapter.registerHoverListener(this._hoverListener),this._adapter.setRange(H(this._dates,this._value[0],this._value[1])),this._adapter.setRangeStart((t=this._value[0])!=null?t:null),this._adapter.setRangeEnd((a=this._value[1])!=null?a:null)}_applyMonth(){this._setMonth(),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._moveFocusToFirstOfMonth(!1))}_applyPreventFocus(){this._adapter.toggleHostAttribute(r.attributes.PREVENT_FOCUS,this._preventFocus),this._adapter.setContainerClass(r.classes.PREVENT_FOCUS,this._preventFocus),this._adapter.setPreventFocusOnMenu(this._preventFocus),this._preventFocus?this._adapter.registerPreventFocusListener(this._preventFocusListener):this._adapter.unregisterPreventFocusListener(this._preventFocusListener),this._isInitialized&&this._view==="date"&&this._resumeTabindexOnDate(!1)}_applyReadOnly(){this._adapter.toggleHostAttribute(r.attributes.READONLY,this._readonly),this._adapter.toggleHostAttribute("aria-readonly",this._readonly,"true"),this._adapter.setContainerClass(r.classes.READONLY,this._readonly),this._readonly?(this._adapter.unregisterDateClickListener(this._dateClickListener),this._adapter.unregisterHoverListener(this._hoverListener)):(this._adapter.registerDateClickListener(this._dateClickListener),this._mode==="range"&&this._adapter.registerHoverListener(this._hoverListener))}_applyRtl(){this._rtl=Ee(this._locale),this._adapter.setContainerClass(r.classes.RTL,this._rtl),this._adapter.toggleContainerAttribute(this._rtl,"dir","rtl")}_applySelectionFollowsMonth(){this._adapter.setHostAttribute(r.attributes.SELECTION_FOLLOWS_MONTH,this._selectionFollowsMonth.toString())}_applyShowHeader(){this._adapter.toggleHostAttribute(r.attributes.SHOW_HEADER,this._showHeader,this._showHeader.toString()),this._showHeader?(this._adapter.setHeader(),this._adapter.registerMonthButtonListener(this._monthButtonListener),this._adapter.registerNextButtonListener(this._nextButtonListener),this._adapter.registerPreviousButtonListener(this._previousButtonListener),this._adapter.registerYearButtonListener(this._yearButtonListener),this._setNavButtonLabels()):(this._adapter.unregisterMonthButtonListener(this._monthButtonListener),this._adapter.unregisterNextButtonListener(this._nextButtonListener),this._adapter.unregisterPreviousButtonListener(this._previousButtonListener),this._adapter.unregisterYearButtonListener(this._yearButtonListener),this._adapter.removeHeader()),this._isInitialized&&(this._adapter.setMonth(this._month,this._locale),this._adapter.setYear(this._year,this._locale),this._setNavigationButtonStates())}_applyShowOtherMonths(){if(this._adapter.toggleHostAttribute(r.attributes.SHOW_OTHER_MONTHS,this._showOtherMonths),this._isInitialized&&this._view==="date"){let e=!1;this._dates.forEach((t,a)=>{p(t,this._month,this._year)||((a===r.numbers.PENULTIMATE_WEEK_BEGIN_INDEX||a===r.numbers.FINAL_WEEK_BEGIN_INDEX)&&(e=!0),this._showOtherMonths&&!e?this._adapter.replaceDate(this._getDateConfig(t),{builder:this._dateBuilder,locale:this._locale}):this._adapter.replaceDateWithSpacer(t),this._setEventsOnDate(t),this._applyWeekendDays())})}}_applyShowToday(){this._adapter.toggleHostAttribute(r.attributes.SHOW_TODAY,this._showToday),this._adapter.setContainerClass(r.classes.SHOW_TODAY,this._showToday)}_applyTodayButton(){this._adapter.toggleHostAttribute(r.attributes.TODAY_BUTTON,!0,this._todayButton.toString()),this._todayButton?(this._adapter.setFooter(),this._adapter.setTodayButton(),this._adapter.registerTodayButtonListener(this._todayButtonListener)):(this._adapter.unregisterTodayButtonListener(this._todayButtonListener),this._adapter.removeTodayButton(),this._clearButton||this._adapter.removeFooter())}_applyTooltipBuilder(){this._view==="date"&&this._dates.forEach(e=>{var i;if(!this._showOtherMonths&&!p(e,this._month,this._year))return;let t=W(e,this._events,this._eventBuilder),a=K(t);this._tooltipBuilder&&(a=(i=this._tooltipBuilder(this._getCalendarDate(e),a))!=null?i:""),this._adapter.setDateTooltip(e,a)})}_applyWeekendDays(){var t;let e=(t=this._weekendDays)!=null?t:this._localeWeekendDays;this._view==="date"&&this._dates.forEach(a=>{let i=a.getDay();this._adapter.setWeekend(a,(this._showOtherMonths||p(a,this._month,this._year))&&e.includes(i))})}_applyValue(e){e=e.map(t=>new Date(t)),Y(e),this._deselectAllDates(),e.forEach(t=>this._selectDate(t)),this._mode==="range"&&(this._rangeSelectionState=this._value.length===2?"to":this._value.length===1?"from":"none",this._clearRangePreview(),this._adapter.setRangeStart(this._value[0]),this._setRangePreview())}_applyView(){switch(this._adapter.setHostAttribute(r.attributes.VIEW,this._view),this._view){case"date":this._closeMenu();break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}}_applyYear(){this._setYear(),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._moveFocusToFirstOfMonth(!1))}_applyYearRange(){this._adapter.setHostAttribute(r.attributes.YEAR_RANGE,this._yearRange);let e=ze(this._yearRange);this._minYear=e.min,this._maxYear=e.max,this._view==="year"&&(this._openYearMenu(),this._setNavigationButtonStates())}get activeDate(){return new Date(this._focusedDate)}get allowSingleDateRange(){return this._allowSingleDateRange}set allowSingleDateRange(e){this._allowSingleDateRange!==e&&(this._allowSingleDateRange=e,this._applyAllowSingleDateRange())}get clearButton(){return this._clearButton}set clearButton(e){this._clearButton!==e&&(this._clearButton=e,this._isInitialized&&this._applyClearButton())}get clearCallback(){return this._clearCallback}set clearCallback(e){this._clearCallback=e}get constrainToEnabled(){return this._constrainToEnabled}set constrainToEnabled(e){this._constrainToEnabled!==e&&(this._constrainToEnabled=e,this._isInitialized&&this._applyConstrainToEnabled())}get dateBuilder(){return this._dateBuilder}set dateBuilder(e){this._dateBuilder=e,this._isInitialized&&this._applyDateBuilder()}get dateSelectCallback(){return this._dateSelectCallback}set dateSelectCallback(e){this._dateSelectCallback=e}get dayBuilder(){return this.dayBuilder}set dayBuilder(e){this._dayBuilder=e,this._isInitialized&&this._applyDayBuilder()}get disabledDateBuilder(){return this._disabledDateBuilder}set disabledDateBuilder(e){this._disabledDateBuilder=e,this._isInitialized&&this._applyDisabledDates()}get disabledDates(){let e=this._disabledDates.map(t=>new Date(t));return e.length?e:null}set disabledDates(e){let t=e?C(e)?e:[e]:[];this._disabledDates=t.map(a=>{let i=new Date(a);return i.setHours(0,0,0,0),i}),this._isInitialized&&this._applyDisabledDates()}get disabledDaysOfWeek(){return this._disabledDaysOfWeek.length?[...this._disabledDaysOfWeek]:null}set disabledDaysOfWeek(e){this._disabledDaysOfWeek=A(e)?C(e)?e:[e]:[],this._isInitialized&&this._applyDisabledDates()}get eventBuilder(){return this._eventBuilder}set eventBuilder(e){this._eventBuilder=e,this._isInitialized&&this._applyEvents()}get events(){return this._events?[...this._events]:null}set events(e){this._events=e!=null&&e.length?[...e]:[],this._isInitialized&&this._applyEvents()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(e){this._firstDayOfWeek!==e&&(this._firstDayOfWeek=A(e)?+e:e,this._isInitialized&&this._applyFirstDayOfWeek())}get fixedHeight(){return this._fixedHeight}set fixedHeight(e){this._fixedHeight!==e&&(this._fixedHeight=e,this._isInitialized&&this._applyFixedHeight())}get listYears(){return this._listYears}set listYears(e){this._listYears!==e&&(this._listYears=e,this._applyListYears())}get locale(){return this._locale}set locale(e){typeof e=="string"&&!e.length&&(e=void 0),this._locale!==e&&(this._locale=e,this._isInitialized&&this._applyLocale())}get max(){return this._max}set max(e){var t;this._maxAttribute!==e&&(this._maxAttribute=(t=e==null?void 0:e.toString())!=null?t:null,this._max=$(e),this._applyMax())}get menuAnimation(){return this._menuAnimation}set menuAnimation(e){this._menuAnimation!==e&&(this._menuAnimation=e,this._isInitialized&&this._applyMenuAnimation())}get min(){return this._min}set min(e){var t;this._minAttribute!==e&&(this._minAttribute=(t=e==null?void 0:e.toString())!=null?t:null,this._min=$(e),this._applyMin())}get mode(){return this._mode}set mode(e){if(this._mode!==e){let t=this._mode;this._mode=e,this._isInitialized&&this._applyMode(t)}}get month(){return this._month}set month(e){if(this._month!==e){let t=isNaN(+e)?this._month:+e;if(this._month===t)return;this._month=+e,this._isInitialized&&this._applyMonth()}}get preventFocus(){return this._preventFocus}set preventFocus(e){this._preventFocus!==e&&(this._preventFocus=e,this._isInitialized&&this._applyPreventFocus())}get readonly(){return this._readonly}set readonly(e){this._readonly!==e&&(this._readonly=e,this._isInitialized&&this._applyReadOnly())}get selectionFollowsMonth(){return this._selectionFollowsMonth}set selectionFollowsMonth(e){this._selectionFollowsMonth!==e&&(this._selectionFollowsMonth=e,this._isInitialized&&this._applySelectionFollowsMonth())}get showHeader(){return this._showHeader}set showHeader(e){this._showHeader!==e&&(this._showHeader=e,this._isInitialized&&this._applyShowHeader())}get showOtherMonths(){return this._showOtherMonths}set showOtherMonths(e){this._showOtherMonths!==e&&(this._showOtherMonths=e,this._isInitialized&&this._applyShowOtherMonths())}get showToday(){return this._showToday}set showToday(e){this._showToday!==e&&(this._showToday=e,this._isInitialized&&this._applyShowToday())}get todayButton(){return this._todayButton}set todayButton(e){this._todayButton!==e&&(this._todayButton=e,this._isInitialized&&this._applyTodayButton())}get todayCallback(){return this._todayCallback}set todayCallback(e){this._todayCallback=e}get tooltipBuilder(){return this._tooltipBuilder}set tooltipBuilder(e){this._tooltipBuilder=e,this._isInitialized&&this._applyTooltipBuilder()}get value(){var t;if(this._mode==="range")return(t=this._rangeSelectionStore)!=null?t:y(this._value);let e=this._value.map(a=>new Date(a));return this._mode==="multiple"?e:e.length?e[0]:null}set value(e){let t=[];if(this._rangeSelectionStore=void 0,!e||Array.isArray(e)&&!e.length)this._value=[];else if(Array.isArray(e))switch(this._mode){case"single":t=[e[0]];break;case"multiple":t=e;break;case"range":let a=R(e);t.push(a[0]),a.length>1&&t.push(a[1]);break}else B(new Date(e))?t=[e]:(this._rangeSelectionStore=new E(e),t=Pe(e));this._applyValue(t)}get view(){return this._view}set view(e){this._view!==e&&(this._view=e,this._applyView())}get weekendDays(){return this._weekendDays?[...this._weekendDays]:null}set weekendDays(e){var t;this._weekendDays=(t=e==null?void 0:e.map(a=>+a))!=null?t:null,this._isInitialized&&this._applyWeekendDays()}get year(){return this._year}set year(e){if(this._year!==e){let t=isNaN(+e)?this._year:+e;if(this._year===t)return;this._year=t,this._isInitialized&&this._applyYear()}}get yearRange(){return this._yearRange}set yearRange(e){this._yearRange!==e&&(this._yearRange=e,this._isInitialized&&this._applyYearRange())}clear(){this._deselectAllDates(),this._clearCallback&&this._clearCallback()}deselectDate(e,t){this._onDateSelected(e,!1),t&&(this._focusedDate=e,this._resumeTabindexOnDate(!0))}goToDate(e,t){this._goToDate(e,t!=null?t:!1)}handleExternalKeyEvent(e){this._onKeydown(e)}layout(){this._applyFirstDayOfWeek(),this._createDateView(),this._applyShowHeader(),this._applyConstrainToEnabled()}selectDate(e,t){this._onDateSelected(e,!0),t&&(this._focusedDate=e,this._resumeTabindexOnDate(!0))}setActiveDate(e,t){return this._dates.some(a=>b(a,e)&&(this._showOtherMonths||p(a,this._month,this._year)))?(this._goToDate(e,t!=null?t:!1),!0):!1}today(){let e=new Date;e.setHours(0,0,0,0),this._goToDate(e,!0),this._todayCallback&&this._todayCallback()}toggleDate(e,t){this._onDateSelected(e)}};var Qe='<template><div class="forge-calendar" part="root"><div id="view" class="forge-calendar__view" part="view"><div id="date-view" class="forge-calendar__date-view" role="grid" part="date-view"><div role="rowgroup" part="date-view-container"><div id="day-row" class="forge-calendar__date-view__row" role="row" part="date-view-row"></div></div><div id="date-grid" class="forge-calendar__date-grid" role="rowgroup" part="date-grid-container"></div></div><forge-calendar-menu id="menu" part="calendar-menu"></forge-calendar-menu></div></div></template>',et='.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);-webkit-transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff)}.forge-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-button-font-size, .875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight,500);letter-spacing:.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);text-decoration:none;-webkit-text-decoration:var(--mdc-typography-button-text-decoration,none);text-decoration:var(--mdc-typography-button-text-decoration,none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform,uppercase);position:relative;display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;min-width:64px;border:none;outline:0;line-height:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle}.forge-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.forge-button::-moz-focus-inner{padding:0;border:0}.forge-button:active{outline:0}.forge-button:hover{cursor:pointer}.forge-button:disabled{cursor:default;pointer-events:none}.forge-button .forge-button__icon{margin-left:0;margin-right:8px;display:inline-block;font-size:1.125rem;height:1.125rem;vertical-align:top;width:1.125rem}.forge-button .forge-button__icon[dir=rtl],[dir=rtl] .forge-button .forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button__label~.forge-button__icon{margin-left:0;margin-right:8px}svg.forge-button__icon{fill:currentColor}.forge-button--outlined .forge-button__icon,.forge-button--raised .forge-button__icon,.forge-button--unelevated .forge-button__icon{margin-left:-4px;margin-right:8px}.forge-button--outlined .forge-button__icon[dir=rtl],.forge-button--raised .forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon,.forge-button--raised .forge-button__label~.forge-button__icon,.forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--raised .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:-4px;margin-right:8px}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.forge-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-button .forge-button__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-button .forge-button__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-button.mdc-ripple-upgraded .forge-button__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-button.mdc-ripple-upgraded--unbounded .forge-button__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-button.mdc-ripple-upgraded--foreground-activation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-button.mdc-ripple-upgraded--foreground-deactivation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-button .forge-button__ripple{position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;width:100%;height:100%;overflow:hidden}.forge-button:not(.forge-button--outlined) .forge-button__ripple{top:0;left:0}.forge-button--raised{-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-webkit-transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1),-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1)}.forge-button--raised:focus,.forge-button--raised:hover{-webkit-box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.forge-button--raised:active{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.forge-button--raised:disabled{-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.forge-button--outlined{border-style:solid}.forge-button{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 8px 0 8px}.forge-button:not(:disabled){background-color:transparent}.forge-button:disabled{background-color:transparent}.forge-button:not(:disabled){color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.forge-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-button.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated:not(:disabled){background-color:#6200ee;background-color:var(--mdc-theme-primary,#6200ee)}.forge-button--unelevated:disabled{background-color:rgba(0,0,0,.38);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.38))}.forge-button--unelevated:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--unelevated:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--unelevated .forge-button__ripple::after,.forge-button--unelevated .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--unelevated.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--unelevated:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--unelevated.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--unelevated:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--unelevated:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--unelevated:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--unelevated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--unelevated .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised:not(:disabled){background-color:#6200ee;background-color:var(--mdc-theme-primary,#6200ee)}.forge-button--raised:disabled{background-color:rgba(0,0,0,.38);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.38))}.forge-button--raised:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--raised:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--raised .forge-button__ripple::after,.forge-button--raised .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--raised.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--raised:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--raised.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--raised:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--raised:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--raised:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--raised.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--raised .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 15px 0 15px;border-width:1px}.forge-button--outlined:not(:disabled){background-color:transparent}.forge-button--outlined:disabled{background-color:transparent}.forge-button--outlined:not(:disabled){color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.forge-button--outlined:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--outlined .forge-button__ripple::after,.forge-button--outlined .forge-button__ripple::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-button--outlined.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--outlined:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button--outlined.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--outlined:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button--outlined:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--outlined:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button--outlined.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button--outlined .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined:not(:disabled){border-color:#6200ee;border-color:var(--mdc-theme-primary,#6200ee)}.forge-button--outlined:disabled{border-color:rgba(0,0,0,.38);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.38))}.forge-button--outlined .forge-button__ripple{top:-1px;left:-1px;border:1px solid transparent}.forge-button--dense{height:24px;margin-top:0;margin-bottom:0;height:1.5rem}forge-button{display:inline-block}forge-button[hidden]{display:none}forge-button[disabled]{cursor:not-allowed}a.forge-hyperlink{color:#6200ee;color:var(--mdc-theme-primary,#6200ee);text-decoration:none}a.forge-hyperlink:visited{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}a.forge-hyperlink[disabled]{pointer-events:none;cursor:default}a.forge-hyperlink:focus,a.forge-hyperlink:hover:not([disabled]){text-decoration:underline}button.forge-hyperlink{color:#6200ee;color:var(--mdc-theme-primary,#6200ee);cursor:pointer;border:none;background-color:transparent;font-size:inherit;padding:0;outline:0;text-align:left}button.forge-hyperlink[disabled]{pointer-events:none;cursor:default}button.forge-hyperlink:hover:not([disabled]){text-decoration:underline}.forge-icon-button{display:-webkit-inline-box;display:inline-flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;outline:0;background-color:transparent;fill:currentColor;color:inherit;font-size:24px;text-decoration:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:48px;height:48px;padding:12px}.forge-icon-button forge-icon,.forge-icon-button img,.forge-icon-button svg{width:24px;height:24px}.forge-icon-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-icon-button:disabled{cursor:default;pointer-events:none}.forge-icon-button__icon{display:inline-block}.forge-icon-button__icon.forge-icon-button__icon--on{display:none}.forge-icon-button--on .forge-icon-button__icon{display:none}.forge-icon-button--on .forge-icon-button__icon.forge-icon-button__icon--on{display:inline-block}.forge-icon-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.forge-icon-button::after,.forge-icon-button::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-icon-button::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-icon-button::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-icon-button.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-icon-button.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-icon-button.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-icon-button.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-icon-button.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-icon-button::after,.forge-icon-button::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.forge-icon-button.mdc-ripple-upgraded::after,.forge-icon-button.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-icon-button.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-icon-button::after,.forge-icon-button::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-icon-button.mdc-ripple-surface--hover::before,.forge-icon-button:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-icon-button.mdc-ripple-upgraded--background-focused::before,.forge-icon-button:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-icon-button:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-icon-button:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-icon-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}forge-icon-button{position:relative;display:inline-block;overflow:visible}.forge-icon-button--on{color:#6200ee;color:var(--mdc-theme-primary,#6200ee)}.forge-icon-button--on::after,.forge-icon-button--on::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-icon-button--on.mdc-ripple-surface--hover::before,.forge-icon-button--on:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-icon-button--on.mdc-ripple-upgraded--background-focused::before,.forge-icon-button--on:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-icon-button--on:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-icon-button--on:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-icon-button--on.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-icon-button--on::before{background-color:#6200ee;background-color:var(--mdc-theme-primary,#6200ee);opacity:.08}.forge-icon-button--dense{width:28px;height:28px;padding:2px;padding:0}.forge-icon-button--dense-1{width:44px;height:44px;padding:10px}.forge-icon-button--dense-2{width:40px;height:40px;padding:8px}.forge-icon-button--dense-3{width:36px;height:36px;padding:6px}.forge-icon-button--dense-4{width:32px;height:32px;padding:4px}.forge-icon-button--dense-5{width:28px;height:28px;padding:2px}.forge-icon-button--dense-6{width:24px;height:24px;padding:0}.forge-icon-button--with-badge forge-badge{z-index:1;z-index:var(--forge-z-index-surface,1);pointer-events:none;--forge-badge-max-width:32px;--forge-badge-border:1px solid transparent}.forge-icon-button--with-badge forge-badge[app-bar-context]{--forge-badge-border:2px solid var(--forge-app-bar-theme-background)}.forge-calendar{width:100%;width:var(--forge-calendar-width,100%);height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;position:relative}.forge-calendar__header{padding:0;padding:var(--forge-calendar-controls-padding,0);display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:justify;justify-content:space-between}.forge-calendar__footer{padding:0;padding:var(--forge-calendar-controls-padding,0);display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:justify;justify-content:space-between}.forge-calendar__view{position:relative}.forge-calendar__date-view{display:block}.forge-calendar__date-view__row{display:grid;grid-template-columns:repeat(7,1fr)}.forge-calendar__date-grid{display:grid}.forge-calendar__day{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;min-width:0;padding:0;font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.forge-calendar__day::after{float:left;padding-top:100%;content:""}.forge-calendar__date{margin-top:2px;margin-top:var(--forge-calendar-row-gap,2px);min-width:0;padding:0;border-radius:50%;position:relative;outline:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.forge-calendar__date::after{float:left;padding-top:100%;content:""}.forge-calendar__date .mdc-ripple-surface{border-radius:inherit}.forge-calendar__date .mdc-ripple-surface::after,.forge-calendar__date .mdc-ripple-surface::before{position:absolute;width:calc(100% - 2px)!important;height:calc(100% - 2px)!important;top:calc(2px / 2)!important;left:calc(2px / 2)!important;border-radius:inherit!important}.forge-calendar__date__inner{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);position:absolute;width:calc(100% - 2px);height:calc(100% - 2px);top:calc(2px / 2);left:calc(2px / 2);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-calendar--show-today .forge-calendar__date--today:not([disabled]){color:#6200ee;color:var(--mdc-theme-primary,#6200ee);border-color:#6200ee;border-color:var(--mdc-theme-primary,#6200ee)}.forge-calendar--show-today .forge-calendar__date--today .forge-calendar__date__inner{border-color:inherit;border-width:1px;border-style:solid;font-weight:700}.forge-calendar--show-today .forge-calendar__date--today.forge-calendar__date--selected{color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]){--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;cursor:pointer}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--unbounded .mdc-ripple-surface::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--foreground-activation .mdc-ripple-surface::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--foreground-deactivation .mdc-ripple-surface::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-surface--hover .mdc-ripple-surface::before,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):hover .mdc-ripple-surface::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--background-focused .mdc-ripple-surface::before,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):not(.mdc-ripple-upgraded):focus .mdc-ripple-surface::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):not(.mdc-ripple-upgraded) .mdc-ripple-surface::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):not(.mdc-ripple-upgraded):active .mdc-ripple-surface::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-calendar__date--selected:not([disabled]) .forge-calendar__date__inner{background-color:#6200ee;background-color:var(--mdc-theme-primary,#6200ee);color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-calendar__date--selected[disabled] .forge-calendar__date__inner{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5);color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.38))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date--selected:hover .forge-calendar__date__inner{opacity:.87}.forge-calendar__date--selected.mdc-ripple-upgraded--background-focused .forge-calendar__date__inner,.forge-calendar__date--selected:focus .forge-calendar__date__inner{opacity:.54}.forge-calendar__date[disabled]{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.38))}.forge-calendar__date-spacer{pointer-events:none}.forge-calendar--fixed-height .forge-calendar__date-spacer{margin-top:2px;margin-top:var(--forge-calendar-row-gap,2px)}.forge-calendar--fixed-height .forge-calendar__date-spacer::after{float:left;padding-top:100%;content:""}.forge-calendar__range:not(.forge-calendar__date-spacer) .forge-calendar__range__target{background-color:#6200ee;background-color:var(--mdc-theme-primary,#6200ee);position:absolute;width:100%;height:100%;opacity:.14;border-radius:0}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--start .forge-calendar__range__target{border-top-left-radius:50%;border-bottom-left-radius:50%}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--end .forge-calendar__range__target{border-top-right-radius:50%;border-bottom-right-radius:50%}.forge-calendar__range:not(.forge-calendar__range--start):first-of-type .forge-calendar__range__target{border-top-left-radius:4px;border-bottom-left-radius:4px}.forge-calendar__range:not(.forge-calendar__range--end):last-of-type .forge-calendar__range__target{border-top-right-radius:4px;border-bottom-right-radius:4px}.forge-calendar--allow-single-date-range .forge-calendar__range--start.forge-calendar__range--end .forge-calendar__range__target{-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s;-webkit-transform:scale(1.15);transform:scale(1.15);-webkit-transform-origin:center;transform-origin:center}.forge-calendar__event{font-size:12px;font-size:var(--forge-calendar-event-dot-size, 12px)}.forge-calendar__event[data-event-theme=primary]{color:#3f51b5;color:var(--forge-calendar-theme-event-primary-accent,#3f51b5)}.forge-calendar__event[data-event-theme=secondary]{color:#ffc107;color:var(--forge-calendar-theme-event-secondary-accent,#ffc107)}.forge-calendar__event[data-event-theme=blue]{color:#2196f3;color:var(--forge-calendar-theme-event-blue-accent,#2196f3)}.forge-calendar__event[data-event-theme=light-green]{color:#8bc34a;color:var(--forge-calendar-theme-event-light-green-accent,#8bc34a)}.forge-calendar__event[data-event-theme=cyan]{color:#00bcd4;color:var(--forge-calendar-theme-event-cyan-accent,#00bcd4)}.forge-calendar__event[data-event-theme=teal]{color:#009688;color:var(--forge-calendar-theme-event-teal-accent,#009688)}.forge-calendar__event[data-event-theme=orange]{color:#ff9800;color:var(--forge-calendar-theme-event-orange-accent,#ff9800)}.forge-calendar__event[data-event-theme=blue-grey]{color:#607d8b;color:var(--forge-calendar-theme-event-blue-grey-accent,#607d8b)}.forge-calendar__event[data-event-theme=grey]{color:#9e9e9e;color:var(--forge-calendar-theme-event-grey-accent,#9e9e9e)}.forge-calendar__event[data-event-theme=red]{color:#f44336;color:var(--forge-calendar-theme-event-red-accent,#f44336)}.forge-calendar__event[data-event-theme=pink]{color:#e91e63;color:var(--forge-calendar-theme-event-pink-accent,#e91e63)}.forge-calendar__event[data-event-theme=purple]{color:#9c27b0;color:var(--forge-calendar-theme-event-purple-accent,#9c27b0)}.forge-calendar__event[data-event-theme=light-blue]{color:#03a9f4;color:var(--forge-calendar-theme-event-light-blue-accent,#03a9f4)}.forge-calendar__event[data-event-theme=deep-purple]{color:#673ab7;color:var(--forge-calendar-theme-event-deep-purple-accent,#673ab7)}.forge-calendar__event[data-event-theme=green]{color:#4caf50;color:var(--forge-calendar-theme-event-green-accent,#4caf50)}.forge-calendar__event[data-event-theme=lime]{color:#cddc39;color:var(--forge-calendar-theme-event-lime-accent,#cddc39)}.forge-calendar__event[data-event-theme=yellow]{color:#ffeb3b;color:var(--forge-calendar-theme-event-yellow-accent,#ffeb3b)}.forge-calendar__event[data-event-theme=brown]{color:#795548;color:var(--forge-calendar-theme-event-brown-accent,#795548)}.forge-calendar__event[data-event-theme=deep-orange]{color:#ff5722;color:var(--forge-calendar-theme-event-deep-orange-accent,#ff5722)}.forge-calendar__date[disabled] .forge-calendar__event{opacity:.14}.forge-calendar__event--overflow{color:#000;color:var(--mdc-theme-on-surface,#000);background-color:var(--mdc-theme-surface);border-radius:50%}.forge-calendar__event__wrapper{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;gap:2px;position:absolute;bottom:0;left:0;width:100%;padding-bottom:2px;pointer-events:none}.forge-calendar__date-spacer .forge-calendar__event__wrapper{display:none}.forge-calendar--rtl .forge-calendar__header forge-icon-button forge-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}#accessible-header{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}#month-button forge-icon{-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.forge-calendar--month-menu-open #month-button forge-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}#year-button forge-icon{-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.forge-calendar--year-menu-open #year-button forge-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host{--forge-calendar-event-stroke-color:#fff;--forge-calendar-event-stroke-color:var(--mdc-theme-surface, #fff);display:inline-block}:host([hidden]){display:none}:host([forge-popup-context=true]){--forge-calendar-event-stroke-color:#ffffff;--forge-calendar-event-stroke-color:var(--forge-theme-elevated-surface, #ffffff)}',l=class extends HTMLElement{constructor(){super();fe.define([de,ce,le,ue,se]),re(this,Qe,et),this._foundation=new z(new P(this))}static get observedAttributes(){return[r.attributes.ALLOW_SINGLE_DATE_RANGE,r.attributes.CLEAR_BUTTON,r.attributes.CONSTRAIN_TO_ENABLED,r.attributes.FIRST_DAY_OF_WEEK,r.attributes.FIXED_HEIGHT,r.attributes.LIST_YEARS,r.attributes.LOCALE,r.attributes.MAX,r.attributes.MENU_ANIMATION,r.attributes.MIN,r.attributes.MODE,r.attributes.MONTH,r.attributes.PREVENT_FOCUS,r.attributes.READONLY,r.attributes.SELECTION_FOLLOWS_MONTH,r.attributes.SHOW_HEADER,r.attributes.SHOW_OTHER_MONTHS,r.attributes.SHOW_TODAY,r.attributes.TODAY_BUTTON,r.attributes.VIEW,r.attributes.YEAR,r.attributes.YEAR_RANGE]}connectedCallback(){!this.hasAttribute(r.attributes.POPUP_CONTEXT)&&Q(this).some(t=>t.tagName.toLowerCase()==="forge-popup")&&this.setAttribute(r.attributes.POPUP_CONTEXT,"true"),this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,a,i){switch(t){case r.attributes.ALLOW_SINGLE_DATE_RANGE:this.allowSingleDateRange=g(i);break;case r.attributes.CLEAR_BUTTON:this.clearButton=g(i);break;case r.attributes.CONSTRAIN_TO_ENABLED:this.constrainToEnabled=g(i);break;case r.attributes.FIRST_DAY_OF_WEEK:this.firstDayOfWeek=I(i);break;case r.attributes.FIXED_HEIGHT:this.fixedHeight=g(i);break;case r.attributes.LIST_YEARS:this.listYears=g(i);break;case r.attributes.LOCALE:this.locale=i;break;case r.attributes.MAX:this.max=i;break;case r.attributes.MENU_ANIMATION:this.menuAnimation=i;break;case r.attributes.MIN:this.min=i;break;case r.attributes.MODE:this.mode=i;break;case r.attributes.MONTH:this.month=I(i);break;case r.attributes.PREVENT_FOCUS:this.preventFocus=g(i);break;case r.attributes.READONLY:this.readonly=g(i);break;case r.attributes.SELECTION_FOLLOWS_MONTH:this.selectionFollowsMonth=g(i);break;case r.attributes.SHOW_HEADER:this.showHeader=g(i);break;case r.attributes.SHOW_OTHER_MONTHS:this.showOtherMonths=g(i);break;case r.attributes.SHOW_TODAY:this.showToday=g(i);break;case r.attributes.TODAY_BUTTON:this.todayButton=g(i);break;case r.attributes.VIEW:this.view=i;break;case r.attributes.YEAR:this.year=I(i);break;case r.attributes.YEAR_RANGE:this.yearRange=i;break}}clear(){this._foundation.clear()}deselectDate(t){this._foundation.deselectDate(new Date(t))}goToDate(t,a){this._foundation.goToDate(new Date(t),a)}handleKey(t){this._foundation.handleExternalKeyEvent(t)}layout(){this._foundation.layout()}selectDate(t){this._foundation.selectDate(new Date(t))}setActiveDate(t,a){return this._foundation.setActiveDate(new Date(t),a)}today(){this._foundation.today()}toggleDate(t,a){this._foundation.toggleDate(new Date(t),a)}};d([c({set:!1})],l.prototype,"activeDate",2),d([c()],l.prototype,"allowSingleDateRange",2),d([c()],l.prototype,"clearButton",2),d([c()],l.prototype,"clearCallback",2),d([c()],l.prototype,"constrainToEnabled",2),d([c()],l.prototype,"dateBuilder",2),d([c()],l.prototype,"dateSelectCallback",2),d([c()],l.prototype,"dayBuilder",2),d([c()],l.prototype,"disabledDateBuilder",2),d([c()],l.prototype,"disabledDates",2),d([c()],l.prototype,"disabledDaysOfWeek",2),d([c()],l.prototype,"eventBuilder",2),d([c()],l.prototype,"events",2),d([c()],l.prototype,"firstDayOfWeek",2),d([c()],l.prototype,"fixedHeight",2),d([c()],l.prototype,"listYears",2),d([c()],l.prototype,"locale",2),d([c()],l.prototype,"max",2),d([c()],l.prototype,"menuAnimation",2),d([c()],l.prototype,"min",2),d([c()],l.prototype,"mode",2),d([c()],l.prototype,"month",2),d([c()],l.prototype,"preventFocus",2),d([c()],l.prototype,"readonly",2),d([c()],l.prototype,"selectionFollowsMonth",2),d([c()],l.prototype,"showHeader",2),d([c()],l.prototype,"showOtherMonths",2),d([c()],l.prototype,"showToday",2),d([c()],l.prototype,"todayButton",2),d([c()],l.prototype,"todayCallback",2),d([c()],l.prototype,"tooltipBuilder",2),d([c()],l.prototype,"value",2),d([c()],l.prototype,"view",2),d([c()],l.prototype,"weekendDays",2),d([c()],l.prototype,"year",2),d([c()],l.prototype,"yearRange",2),l=d([oe({name:r.elementName,dependencies:[me,ye,be,ge,ve]})],l);var Ke=class extends pe{constructor(e){super(e)}_build(){return document.createElement(r.elementName)}onDateSelect(e){this._element.addEventListener(r.events.DATE_SELECT,e)}onFocusChange(e){this._element.addEventListener(r.events.FOCUS_CHANGE,e)}onMonthChange(e){this._element.addEventListener(r.events.MONTH_CHANGE,e)}onViewChange(e){this._element.addEventListener(r.events.VIEW_CHANGE,e)}};function Va(){ie(l)}export{V as a,_t as b,O as c,Re as d,ft as e,N as f,He as g,p as h,Ze as i,Y as j,We as k,y as l,Pe as m,R as n,H as o,K as p,Je as q,ze as r,Ge as s,Ue as t,qe as u,k as v,h as w,S as x,W as y,Ve as z,$ as A,X as B,P as C,z as D,l as E,Ke as F,Va as G};
|
|
7
|
-
//# sourceMappingURL=chunk.B4T3R53C.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{h as i}from"./chunk.MVTBJPO2.js";import{u as o}from"./chunk.K7FPXAFS.js";var r=class{constructor(e){this._component=e}getHostAttribute(e){return this._component.getAttribute(e)}setHostAttribute(e,t=""){this._component.setAttribute(e,t)}removeHostAttribute(e){this._component.removeAttribute(e)}toggleHostAttribute(e,t,n){o(this._component,t,e,n)}emitHostEvent(e,t=null,n=!0,s){return i(this._component,e,t,n,s)}addHostListener(e,t,n){this._component.addEventListener(e,t,n)}removeHostListener(e,t){this._component.removeEventListener(e,t)}addWindowListener(e,t,n){window.addEventListener(e,t,n)}removeWindowListener(e,t,n){window.removeEventListener(e,t,n)}addDocumentListener(e,t,n){document.addEventListener(e,t,n)}removeDocumentListener(e,t,n){document.removeEventListener(e,t,n)}getScreenWidth(){return window.innerWidth}setBodyAttribute(e,t){document.body.setAttribute(e,t)}removeBodyAttribute(e){document.body.removeAttribute(e)}get isConnected(){return this._component.isConnected}};export{r as a};
|
|
7
|
-
//# sourceMappingURL=chunk.BKL2BAYW.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/core/base/base-adapter.ts"],
|
|
4
|
-
"sourcesContent": ["import { emitEvent, toggleAttribute } from '@tylertech/forge-core';\nimport { IBaseComponent } from './base-component';\n\nexport interface IBaseAdapter {\n readonly isConnected: boolean;\n removeHostAttribute(name: string): void;\n getHostAttribute(name: string): string | null;\n setHostAttribute(name: string, value?: string): void;\n toggleHostAttribute(name: string, hasAttribute: boolean, value?: string): void;\n emitHostEvent(type: string, data?: any, bubble?: boolean, cancelable?: boolean): boolean;\n addHostListener(event: string, callback: (event: Event) => void, options?: boolean | AddEventListenerOptions): void;\n removeHostListener(event: string, callback: (event: Event) => void): void;\n addWindowListener(event: string, callback: (event: Event) => void, options?: boolean | AddEventListenerOptions): void;\n removeWindowListener(event: string, callback: (event: Event) => void, options?: boolean | EventListenerOptions): void;\n addDocumentListener(event: string, callback: (event: Event) => void, options?: boolean | AddEventListenerOptions): void;\n removeDocumentListener(event: string, callback: (event: Event) => void, options?: boolean | EventListenerOptions): void;\n getScreenWidth(): number;\n setBodyAttribute(name: string, value: string): void;\n removeBodyAttribute(name: string): void;\n}\n\nexport class BaseAdapter<T extends IBaseComponent> implements IBaseAdapter {\n constructor(protected _component: T) {}\n\n public getHostAttribute(name: string): string | null {\n return this._component.getAttribute(name);\n }\n\n public setHostAttribute(name: string, value = ''): void {\n this._component.setAttribute(name, value);\n }\n\n public removeHostAttribute(name: string): void {\n this._component.removeAttribute(name);\n }\n\n public toggleHostAttribute(name: string, hasAttribute: boolean, value?: string): void {\n toggleAttribute(this._component, hasAttribute, name, value);\n }\n\n public emitHostEvent(type: string, data: any = null, bubble = true, cancelable?: boolean): boolean {\n return emitEvent(this._component, type, data, bubble, cancelable);\n }\n\n public addHostListener(event: string, callback: (event: Event) => void, options?: boolean | AddEventListenerOptions): void {\n this._component.addEventListener(event, callback, options);\n }\n\n public removeHostListener(event: string, callback: (event: Event) => void): void {\n this._component.removeEventListener(event, callback);\n }\n\n public addWindowListener(event: string, callback: (event: Event) => void, options?: boolean | AddEventListenerOptions): void {\n window.addEventListener(event, callback, options);\n }\n\n public removeWindowListener(event: string, callback: (event: Event) => void, options?: boolean | EventListenerOptions): void {\n window.removeEventListener(event, callback, options);\n }\n\n public addDocumentListener(event: string, callback: (event: Event) => void, options?: boolean | AddEventListenerOptions): void {\n document.addEventListener(event, callback, options);\n }\n\n public removeDocumentListener(event: string, callback: (event: Event) => void, options?: boolean | EventListenerOptions): void {\n document.removeEventListener(event, callback, options);\n }\n\n public getScreenWidth(): number {\n return window.innerWidth;\n }\n\n public setBodyAttribute(name: string, value: string): void {\n document.body.setAttribute(name, value);\n }\n\n public removeBodyAttribute(name: string): void {\n document.body.removeAttribute(name);\n }\n\n public get isConnected(): boolean {\n return this._component.isConnected;\n }\n}\n"],
|
|
5
|
-
"mappings": "gFAqBO,IAAMA,EAAN,KAAoE,CACzE,YAAsBC,EAAe,CAAf,gBAAAA,CAAgB,CAE/B,iBAAiBC,EAA6B,CACnD,OAAO,KAAK,WAAW,aAAaA,CAAI,CAC1C,CAEO,iBAAiBA,EAAcC,EAAQ,GAAU,CACtD,KAAK,WAAW,aAAaD,EAAMC,CAAK,CAC1C,CAEO,oBAAoBD,EAAoB,CAC7C,KAAK,WAAW,gBAAgBA,CAAI,CACtC,CAEO,oBAAoBA,EAAcE,EAAuBD,EAAsB,CACpFE,EAAgB,KAAK,WAAYD,EAAcF,EAAMC,CAAK,CAC5D,CAEO,cAAcG,EAAcC,EAAY,KAAMC,EAAS,GAAMC,EAA+B,CACjG,OAAOC,EAAU,KAAK,WAAYJ,EAAMC,EAAMC,EAAQC,CAAU,CAClE,CAEO,gBAAgBE,EAAeC,EAAkCC,EAAmD,CACzH,KAAK,WAAW,iBAAiBF,EAAOC,EAAUC,CAAO,CAC3D,CAEO,mBAAmBF,EAAeC,EAAwC,CAC/E,KAAK,WAAW,oBAAoBD,EAAOC,CAAQ,CACrD,CAEO,kBAAkBD,EAAeC,EAAkCC,EAAmD,CAC3H,OAAO,iBAAiBF,EAAOC,EAAUC,CAAO,CAClD,CAEO,qBAAqBF,EAAeC,EAAkCC,EAAgD,CAC3H,OAAO,oBAAoBF,EAAOC,EAAUC,CAAO,CACrD,CAEO,oBAAoBF,EAAeC,EAAkCC,EAAmD,CAC7H,SAAS,iBAAiBF,EAAOC,EAAUC,CAAO,CACpD,CAEO,uBAAuBF,EAAeC,EAAkCC,EAAgD,CAC7H,SAAS,oBAAoBF,EAAOC,EAAUC,CAAO,CACvD,CAEO,gBAAyB,CAC9B,OAAO,OAAO,UAChB,CAEO,iBAAiBX,EAAcC,EAAqB,CACzD,SAAS,KAAK,aAAaD,EAAMC,CAAK,CACxC,CAEO,oBAAoBD,EAAoB,CAC7C,SAAS,KAAK,gBAAgBA,CAAI,CACpC,CAEA,IAAW,aAAuB,CAChC,OAAO,KAAK,WAAW,WACzB,CACF",
|
|
6
|
-
"names": ["BaseAdapter", "_component", "name", "value", "hasAttribute", "toggleAttribute", "type", "data", "bubble", "cancelable", "emitEvent", "event", "callback", "options"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as p}from"./chunk.NVUMRW44.js";import{a as _}from"./chunk.BKL2BAYW.js";import{a as g,b as f}from"./chunk.DXN7ZOH3.js";import{a as m,k as h}from"./chunk.MVTBJPO2.js";import{q as c}from"./chunk.K7FPXAFS.js";import{k as d}from"./chunk.J2M2MXP2.js";import{d as l}from"./chunk.M3QDAYD2.js";var A=`${f}keyboard-shortcut`,L={KEY:"key",TARGET:"target",GLOBAL:"global",ALLOW_WHILE_TYPING:"allow-while-typing",USE_CODE:"use-code",PREVENT_DEFAULT:"prevent-default",CAPTURE:"capture",DISABLED:"disabled"},k={TOOLTIP:"forge-tooltip"},K={ACTIVATE:"forge-keyboard-shortcut-activate"},t={elementName:A,attributes:L,selectors:k,events:K},E=["date","datetime","datetime-local","email","month","number","password","search","tel","text","time","url","week"];var u=class extends _{constructor(r){super(r);this.component=r}hasTargetElement(){return!!this._targetElement}destroy(){this._targetElement=null}addTargetEventListener(r,a,i){var s;(s=this._targetElement)==null||s.addEventListener(r,a,{capture:i})}removeTargetEventListener(r,a,i){var s;(s=this._targetElement)==null||s.removeEventListener(r,a,{capture:i})}setHostStyles(){this.component.style.display="none"}setTargetElement(r,a){if(a){let i=this._component.ownerDocument||document;this._targetElement=i.documentElement;return}if(r){if(this._component.parentElement){if(c(this._component.parentElement,r)){this._targetElement=this._component.parentElement;return}this._targetElement=this._component.parentElement.querySelector(r);return}}else{let i=this._component.previousElementSibling;for(;i;){if(!c(i,t.selectors.TOOLTIP)){this._targetElement=i;return}i=i.previousElementSibling}this._targetElement=this._component.parentElement;return}}};function y(n){return n instanceof HTMLInputElement?E.includes(n.type):!1}function T(n,e=!1){return!n||!n.length?[]:n.split(" ").map(a=>a.trim()).map(a=>{let i=a.split("+"),s=e?i.pop()||"":D((i.pop()||"").toLowerCase()),C=i.sort().join("").toLowerCase();return{key:s,modifier:C}})}function v(n,e,r=!1){let a=r?n.code:n.key.toLowerCase(),i=I(n);return e.some(s=>a===s.key&&i===s.modifier)}function I(n){let e="";return n.altKey&&(e+="alt"),n.ctrlKey&&(e+="control"),n.metaKey&&(e+="meta"),n.shiftKey&&(e+="shift"),e}function D(n){switch(n){case"plus":return"+";case"space":return" ";default:return n}}var b=class{constructor(e){this._adapter=e;this._global=!1;this._allowWhileTyping=!1;this._preventDefault=!0;this._capture=!1;this._useCode=!1;this._disabled=!1;this._keyDownListener=r=>this._onKeyDown(r)}initialize(){this._initializeTargetElement(),this._adapter.setHostStyles()}disconnect(){this._disconnectTargetElement(),this._adapter.destroy()}_initializeTargetElement(){if(this._disconnectTargetElement(),this._adapter.setTargetElement(this._target,this._global),!this._adapter.hasTargetElement())throw new Error("Unable to locate the target element.");this._disabled||this._connectTargetElement()}_connectTargetElement(){this._adapter.hasTargetElement&&this._adapter.addTargetEventListener("keydown",this._keyDownListener,this._capture)}_disconnectTargetElement(){this._adapter.hasTargetElement&&this._adapter.removeTargetEventListener("keydown",this._keyDownListener,this._capture)}_onKeyDown(e){!this._allowWhileTyping&&y(e.target)||v(e,this._keyCombinations,this._useCode)&&(this._preventDefault&&e.preventDefault(),this._adapter.emitHostEvent(t.events.ACTIVATE,e))}_setKeyCombinations(){this._keyCombinations=T(this._key,this._useCode)}get key(){return this._key}set key(e){this._key!==e&&(this._key=e,this._adapter.toggleHostAttribute(t.attributes.KEY,!!this.key,this._key||""),this._setKeyCombinations())}get target(){return this._target}set target(e){this._target!==e&&(this._target=e,this._adapter.setHostAttribute(t.attributes.TARGET,this._target),this._adapter.isConnected&&this._initializeTargetElement())}get global(){return this._global}set global(e){this._global!==e&&(this._global=e,this._adapter.toggleHostAttribute(t.attributes.GLOBAL,this._global),this._adapter.isConnected&&this._initializeTargetElement())}get allowWhileTyping(){return this._allowWhileTyping}set allowWhileTyping(e){this._allowWhileTyping!==e&&(this._allowWhileTyping=e,this._adapter.toggleHostAttribute(t.attributes.ALLOW_WHILE_TYPING,this._allowWhileTyping))}get preventDefault(){return this._preventDefault}set preventDefault(e){this._preventDefault!==e&&(this._preventDefault=e,this._adapter.toggleHostAttribute(t.attributes.PREVENT_DEFAULT,this._preventDefault))}get capture(){return this._capture}set capture(e){this._capture!==e&&(this._disconnectTargetElement(),this._capture=e,this._adapter.toggleHostAttribute(t.attributes.CAPTURE,this.capture),this._connectTargetElement())}get useCode(){return this._useCode}set useCode(e){this._useCode!==e&&(this._useCode=e,this._adapter.toggleHostAttribute(t.attributes.USE_CODE,this._useCode),this._setKeyCombinations())}get disabled(){return this._disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._adapter.toggleHostAttribute(t.attributes.DISABLED,this._disabled),this._disabled?this._disconnectTargetElement():this._connectTargetElement())}};var o=class extends h{constructor(){super();this._foundation=new b(new u(this))}static get observedAttributes(){return[t.attributes.KEY,t.attributes.TARGET,t.attributes.GLOBAL,t.attributes.ALLOW_WHILE_TYPING,t.attributes.PREVENT_DEFAULT,t.attributes.CAPTURE,t.attributes.USE_CODE,t.attributes.DISABLED]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(r,a,i){switch(r){case t.attributes.KEY:this.key=i;break;case t.attributes.TARGET:this.target=i;break;case t.attributes.GLOBAL:this.global=d(i);break;case t.attributes.ALLOW_WHILE_TYPING:this.allowWhileTyping=d(i);break;case t.attributes.PREVENT_DEFAULT:this.preventDefault=d(i);break;case t.attributes.CAPTURE:this.capture=d(i);break;case t.attributes.USE_CODE:this.useCode=d(i);break;case t.attributes.DISABLED:this.disabled=d(i);break}}get keyBinding(){return this.key}set keyBinding(r){this.key=r}};l([p()],o.prototype,"key",2),l([p()],o.prototype,"target",2),l([p()],o.prototype,"global",2),l([p()],o.prototype,"allowWhileTyping",2),l([p()],o.prototype,"preventDefault",2),l([p()],o.prototype,"capture",2),l([p()],o.prototype,"useCode",2),l([p()],o.prototype,"disabled",2),o=l([g({name:t.elementName})],o);function ee(){m(o)}export{t as a,E as b,u as c,y as d,T as e,v as f,I as g,D as h,b as i,o as j,ee as k};
|
|
7
|
-
//# sourceMappingURL=chunk.CXY6K7EI.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/keyboard-shortcut/keyboard-shortcut-constants.ts", "../../src/keyboard-shortcut/keyboard-shortcut-adapter.ts", "../../src/keyboard-shortcut/keyboard-shortcut-utils.ts", "../../src/keyboard-shortcut/keyboard-shortcut-foundation.ts", "../../src/keyboard-shortcut/keyboard-shortcut.ts", "../../src/keyboard-shortcut/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}keyboard-shortcut`;\n\nconst attributes = {\n KEY: 'key',\n TARGET: 'target',\n GLOBAL: 'global',\n ALLOW_WHILE_TYPING: 'allow-while-typing',\n USE_CODE: 'use-code',\n PREVENT_DEFAULT: 'prevent-default',\n CAPTURE: 'capture',\n DISABLED: 'disabled'\n};\n\nconst selectors = {\n TOOLTIP: 'forge-tooltip'\n};\n\nconst events = {\n ACTIVATE: `forge-keyboard-shortcut-activate`\n};\n\nexport const KEYBOARD_SHORTCUT_CONSTANTS = {\n elementName,\n attributes,\n selectors,\n events\n};\n\nexport const textInputTypes = [\n 'date',\n 'datetime',\n 'datetime-local',\n 'email',\n 'month',\n 'number',\n 'password',\n 'search',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week'\n];\n\nexport interface IKeyCombination {\n key: string;\n modifier?: string;\n}\n", "import { matchesSelectors } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../core/base';\nimport { IKeyboardShortcutComponent } from './keyboard-shortcut';\nimport { KEYBOARD_SHORTCUT_CONSTANTS } from './keyboard-shortcut-constants';\n\nexport interface IKeyboardShortcutAdapter extends IBaseAdapter {\n hasTargetElement(): boolean;\n destroy(): void;\n addTargetEventListener(type: string, listener: (evt: KeyboardEvent) => void, capture?: boolean): void;\n removeTargetEventListener(type: string, listener: (evt: KeyboardEvent) => void, capture?: boolean): void;\n setHostStyles(): void;\n setTargetElement(target: string | undefined, global: boolean): void;\n}\n\nexport class KeyboardShortcutAdapter extends BaseAdapter<IKeyboardShortcutComponent> implements IKeyboardShortcutAdapter {\n private _targetElement: HTMLElement | null;\n\n constructor(public component: IKeyboardShortcutComponent) {\n super(component);\n }\n\n public hasTargetElement(): boolean {\n return !!this._targetElement;\n }\n\n public destroy(): void {\n this._targetElement = null;\n }\n\n /**\n * Adds an event listener to the target element.\n * @param type The event type.\n * @param listener The event listener.\n */\n public addTargetEventListener(type: string, listener: (evt: KeyboardEvent) => void, capture?: boolean): void {\n this._targetElement?.addEventListener(type, listener, { capture });\n }\n\n /**\n * Removes an event listener from the target element.\n * @param type The event type.\n * @param listener The event listener.\n */\n public removeTargetEventListener(type: string, listener: (evt: KeyboardEvent) => void, capture?: boolean): void {\n this._targetElement?.removeEventListener(type, listener, { capture });\n }\n\n /**\n * Sets the host element's display to none\n */\n public setHostStyles(): void {\n this.component.style.display = 'none';\n }\n\n /**\n * Sets the target element based on the provided CSS selector.\n * @param {string | undefined} selector The target element selector.\n * @param {boolean} global Whether to target the document element.\n */\n public setTargetElement(selector: string | undefined, global: boolean): void {\n if (global) {\n const doc = this._component.ownerDocument || document;\n this._targetElement = doc.documentElement;\n return;\n }\n \n if (selector) {\n if (this._component.parentElement) {\n if (matchesSelectors(this._component.parentElement, selector)) {\n this._targetElement = this._component.parentElement;\n return;\n }\n this._targetElement = this._component.parentElement.querySelector(selector);\n return;\n }\n } else {\n let sibling = this._component.previousElementSibling;\n while (sibling) {\n // Ignore <forge-tooltip> elements\n if (!matchesSelectors(sibling, KEYBOARD_SHORTCUT_CONSTANTS.selectors.TOOLTIP)) {\n this._targetElement = sibling as HTMLElement;\n return;\n }\n sibling = sibling.previousElementSibling;\n }\n this._targetElement = this._component.parentElement as HTMLElement;\n return;\n }\n }\n}\n", "import { textInputTypes, IKeyCombination } from './keyboard-shortcut-constants';\n\n/** Checks if an HTML element allows text input */\nexport function elementAcceptsTextInput(el: any): boolean {\n if (el instanceof HTMLInputElement) {\n return textInputTypes.includes(el.type);\n }\n return false;\n}\n\n/** Parses a string of key combinations into an array of keys and modifiers */\nexport function parseKeyCombinations(keys: string | null | undefined, useCode = false): IKeyCombination[] {\n if (!keys || !keys.length) {\n return [];\n }\n\n const separatedKeys = keys.split(' ').map(key => key.trim());\n return separatedKeys.map(key => {\n const keyParts = key.split('+');\n const fixedKey = useCode ? keyParts.pop() || '' : fixKey((keyParts.pop() || '').toLowerCase());\n const modifiers = keyParts.sort().join('').toLowerCase();\n return { key: fixedKey, modifier: modifiers };\n });\n}\n\n/** Checks a keyboard event for a matching key combination */\nexport function matchKeyCombination(evt: KeyboardEvent, keyCombinations: IKeyCombination[], useCode = false): boolean {\n const eventKey = useCode ? evt.code : evt.key.toLowerCase();\n const modifierKeys = getModiferKeysString(evt);\n return keyCombinations.some(combination => eventKey === combination.key && modifierKeys === combination.modifier);\n}\n\n/** Returns an array of active modifier keys from a keyboard event */\nexport function getModiferKeysString(evt: KeyboardEvent): string {\n // Ensure the modifier keys are appended in alphabetical order\n let modifierString = '';\n if (evt.altKey) {\n modifierString += 'alt';\n }\n if (evt.ctrlKey) {\n modifierString += 'control';\n }\n if (evt.metaKey) {\n modifierString += 'meta';\n }\n if (evt.shiftKey) {\n modifierString += 'shift';\n }\n return modifierString;\n}\n\n/** Returns a reserved key character from its alias */\nexport function fixKey(key: string): string {\n switch (key) {\n case 'plus':\n return '+';\n case 'space':\n return ' ';\n default:\n return key;\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { IKeyboardShortcutAdapter } from './keyboard-shortcut-adapter';\nimport { IKeyCombination, KEYBOARD_SHORTCUT_CONSTANTS } from './keyboard-shortcut-constants';\nimport { elementAcceptsTextInput, matchKeyCombination, parseKeyCombinations } from './keyboard-shortcut-utils';\n\nexport interface IKeyboardShortcutFoundation extends ICustomElementFoundation {\n key: string | null | undefined;\n target: string;\n global: boolean;\n allowWhileTyping: boolean;\n preventDefault: boolean;\n capture: boolean;\n useCode: boolean;\n disabled: boolean;\n}\n\nexport class KeyboardShortcutFoundation implements IKeyboardShortcutFoundation {\n private _key: string | null | undefined;\n private _target: string;\n private _global = false;\n private _allowWhileTyping = false;\n private _preventDefault = true;\n private _capture = false;\n private _useCode = false;\n private _disabled = false;\n private _keyCombinations: IKeyCombination[];\n private _keyDownListener: (evt: KeyboardEvent) => void;\n \n constructor(private _adapter: IKeyboardShortcutAdapter) {\n this._keyDownListener = evt => this._onKeyDown(evt);\n }\n\n public initialize(): void {\n this._initializeTargetElement();\n this._adapter.setHostStyles();\n }\n\n public disconnect(): void {\n this._disconnectTargetElement();\n this._adapter.destroy();\n }\n\n private _initializeTargetElement(): void {\n this._disconnectTargetElement();\n this._adapter.setTargetElement(this._target, this._global);\n \n if (!this._adapter.hasTargetElement()) {\n throw new Error('Unable to locate the target element.');\n }\n\n if (!this._disabled) {\n this._connectTargetElement();\n }\n }\n\n private _connectTargetElement(): void {\n if (!this._adapter.hasTargetElement) {\n return;\n }\n this._adapter.addTargetEventListener('keydown', this._keyDownListener, this._capture);\n }\n\n private _disconnectTargetElement(): void {\n if (!this._adapter.hasTargetElement) {\n return;\n }\n this._adapter.removeTargetEventListener('keydown', this._keyDownListener, this._capture);\n }\n\n private _onKeyDown(evt: KeyboardEvent): void {\n // Here we may check if the target element is disabled, but disabled elements typically can't receive focus anyway\n\n // Ignore the event if it originates from a text field\n // TODO: bypass this and allow it if a modifier key is used?\n if (!this._allowWhileTyping && elementAcceptsTextInput(evt.target)) {\n return;\n }\n\n if (matchKeyCombination(evt, this._keyCombinations, this._useCode)) {\n if (this._preventDefault) {\n evt.preventDefault();\n }\n this._adapter.emitHostEvent(KEYBOARD_SHORTCUT_CONSTANTS.events.ACTIVATE, evt);\n }\n }\n\n /** Sets the key combinations. */\n private _setKeyCombinations(): void {\n this._keyCombinations = parseKeyCombinations(this._key, this._useCode);\n }\n\n /** Gets/sets the key binding. */\n public get key(): string | null | undefined {\n return this._key;\n }\n public set key(value: string| null | undefined) {\n if (this._key !== value) {\n this._key = value;\n this._adapter.toggleHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.KEY, !!this.key, this._key || '');\n this._setKeyCombinations();\n }\n // TODO: prevent multiple shortcuts with the same keys on an element (possible?)\n }\n\n /** Gets/sets the target element selector. */\n public get target(): string {\n return this._target;\n }\n public set target(value: string) {\n if (this._target !== value) {\n this._target = value;\n this._adapter.setHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.TARGET, this._target);\n if (this._adapter.isConnected) {\n this._initializeTargetElement();\n }\n }\n }\n\n /** Gets/sets the global listener state. */\n public get global(): boolean {\n return this._global;\n }\n public set global(value: boolean) {\n if (this._global !== value) {\n this._global = value;\n this._adapter.toggleHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.GLOBAL, this._global);\n if (this._adapter.isConnected) {\n this._initializeTargetElement();\n }\n }\n }\n\n /** Gets/sets whether the callback will be trigger while a text input has focus. */\n public get allowWhileTyping(): boolean {\n return this._allowWhileTyping;\n }\n public set allowWhileTyping(value: boolean) {\n if (this._allowWhileTyping !== value) {\n this._allowWhileTyping = value;\n this._adapter.toggleHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.ALLOW_WHILE_TYPING, this._allowWhileTyping);\n }\n }\n\n /** Gets/sets whether to prevent default on keyboard events. */\n public get preventDefault(): boolean {\n return this._preventDefault;\n }\n public set preventDefault(value: boolean) {\n if (this._preventDefault !== value) {\n this._preventDefault = value;\n this._adapter.toggleHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.PREVENT_DEFAULT, this._preventDefault);\n }\n }\n\n /** Gets/sets whether to use capturing on keyboard events. */\n public get capture(): boolean {\n return this._capture;\n }\n public set capture(value: boolean) {\n if (this._capture !== value) {\n this._disconnectTargetElement(); // We need to disconnect first to ensure our listener is removed properly based on capturing state\n this._capture = value;\n this._adapter.toggleHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.CAPTURE, this.capture);\n this._connectTargetElement();\n }\n }\n\n /** Gets/sets whether to match codes instead of keys on keyboard events. */\n public get useCode(): boolean{\n return this._useCode;\n }\n public set useCode(value: boolean) {\n if (this._useCode !== value) {\n this._useCode = value;\n this._adapter.toggleHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.USE_CODE, this._useCode);\n this._setKeyCombinations();\n }\n }\n\n /** Gets/sets whether the event will be emitted. */\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._adapter.toggleHostAttribute(KEYBOARD_SHORTCUT_CONSTANTS.attributes.DISABLED, this._disabled);\n\n if (this._disabled) {\n this._disconnectTargetElement();\n } else {\n this._connectTargetElement();\n }\n }\n }\n}\n", "import { coerceBoolean, CustomElement, FoundationProperty } from '@tylertech/forge-core';\n\nimport { KeyboardShortcutAdapter } from './keyboard-shortcut-adapter';\nimport { KeyboardShortcutFoundation } from './keyboard-shortcut-foundation';\nimport { KEYBOARD_SHORTCUT_CONSTANTS } from './keyboard-shortcut-constants';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nexport interface IKeyboardShortcutComponent extends IBaseComponent {\n key: string | null | undefined;\n keyBinding: string | null | undefined;\n target: string;\n global: boolean;\n allowWhileTyping: boolean;\n preventDefault: boolean;\n capture: boolean;\n useCode: boolean;\n disabled: boolean;\n}\n\ndeclare global {\n // tslint:disable-next-line: interface-name\n interface HTMLElementTagNameMap {\n 'forge-keyboard-shortcut': IKeyboardShortcutComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-keyboard-shortcut-activate': CustomEvent<KeyboardEvent>;\n }\n}\n\n/**\n * The web component class behind the `<forge-keyboard-shortcut>` custom element.\n * \n * @tag forge-keyboard-shortcut\n */\n@CustomElement({\n name: KEYBOARD_SHORTCUT_CONSTANTS.elementName\n})\nexport class KeyboardShortcutComponent extends BaseComponent implements IKeyboardShortcutComponent {\n public static get observedAttributes(): string[] {\n return [\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.KEY,\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.TARGET,\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.GLOBAL,\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.ALLOW_WHILE_TYPING,\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.PREVENT_DEFAULT,\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.CAPTURE,\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.USE_CODE,\n KEYBOARD_SHORTCUT_CONSTANTS.attributes.DISABLED\n ];\n }\n\n private _foundation: KeyboardShortcutFoundation;\n\n constructor() {\n super();\n this._foundation = new KeyboardShortcutFoundation(new KeyboardShortcutAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case KEYBOARD_SHORTCUT_CONSTANTS.attributes.KEY:\n this.key = newValue;\n break;\n case KEYBOARD_SHORTCUT_CONSTANTS.attributes.TARGET:\n this.target = newValue;\n break;\n case KEYBOARD_SHORTCUT_CONSTANTS.attributes.GLOBAL:\n this.global = coerceBoolean(newValue);\n break;\n case KEYBOARD_SHORTCUT_CONSTANTS.attributes.ALLOW_WHILE_TYPING:\n this.allowWhileTyping = coerceBoolean(newValue);\n break;\n case KEYBOARD_SHORTCUT_CONSTANTS.attributes.PREVENT_DEFAULT:\n this.preventDefault = coerceBoolean(newValue);\n break;\n case KEYBOARD_SHORTCUT_CONSTANTS.attributes.CAPTURE:\n this.capture = coerceBoolean(newValue);\n break;\n case KEYBOARD_SHORTCUT_CONSTANTS.attributes.USE_CODE:\n this.useCode = coerceBoolean(newValue);\n break;\n case KEYBOARD_SHORTCUT_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n }\n }\n\n /** Gets/sets the key binding. */\n @FoundationProperty()\n public declare key: string | null | undefined;\n\n /** Alias for key. */\n public get keyBinding(): string | null | undefined {\n return this.key;\n }\n public set keyBinding(value: string | null | undefined) {\n this.key = value;\n }\n\n /** Gets/sets the target element selector. */\n @FoundationProperty()\n public declare target: string;\n\n /** Gets/sets the global listener state. */\n @FoundationProperty()\n public declare global: boolean;\n\n /** Gets/sets whether the callback will be called while in a text entry field. */\n @FoundationProperty()\n public declare allowWhileTyping: boolean;\n \n /** Gets/sets whether to prevent default on keyboard events */\n @FoundationProperty()\n public declare preventDefault: boolean;\n \n /** Gets/sets whether to use capturing on keyboard events */\n @FoundationProperty()\n public declare capture: boolean;\n \n /** Gets/sets whether to match codes instead of keys on keyboard events */\n @FoundationProperty()\n public declare useCode: boolean;\n\n /** Gets/sets whether the callback will be called. */\n @FoundationProperty()\n public declare disabled: boolean;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { KeyboardShortcutComponent } from './keyboard-shortcut';\n\nexport * from './keyboard-shortcut-adapter';\nexport * from './keyboard-shortcut-constants';\nexport * from './keyboard-shortcut-foundation';\nexport * from './keyboard-shortcut-utils';\nexport * from './keyboard-shortcut';\n\nexport function defineKeyboardShortcutComponent(): void {\n defineCustomElement(KeyboardShortcutComponent);\n}\n"],
|
|
5
|
-
"mappings": "sSAEA,IAAMA,EAA2C,GAAGC,qBAE9CC,EAAa,CACjB,IAAK,MACL,OAAQ,SACR,OAAQ,SACR,mBAAoB,qBACpB,SAAU,WACV,gBAAiB,kBACjB,QAAS,UACT,SAAU,UACZ,EAEMC,EAAY,CAChB,QAAS,eACX,EAEMC,EAAS,CACb,SAAU,kCACZ,EAEaC,EAA8B,CACzC,YAAAL,EACA,WAAAE,EACA,UAAAC,EACA,OAAAC,CACF,EAEaE,EAAiB,CAC5B,OACA,WACA,iBACA,QACA,QACA,SACA,WACA,SACA,MACA,OACA,OACA,MACA,MACF,EC9BO,IAAMC,EAAN,cAAsCC,CAA4E,CAGvH,YAAmBC,EAAuC,CACxD,MAAMA,CAAS,EADE,eAAAA,CAEnB,CAEO,kBAA4B,CACjC,MAAO,CAAC,CAAC,KAAK,cAChB,CAEO,SAAgB,CACrB,KAAK,eAAiB,IACxB,CAOO,uBAAuBC,EAAcC,EAAwCC,EAAyB,CAlC/G,IAAAC,GAmCIA,EAAA,KAAK,iBAAL,MAAAA,EA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FIX", "attributes", "selectors", "events", "KEYBOARD_SHORTCUT_CONSTANTS", "textInputTypes", "KeyboardShortcutAdapter", "BaseAdapter", "component", "type", "listener", "capture", "_a", "selector", "global", "doc", "matchesSelectors", "sibling", "KEYBOARD_SHORTCUT_CONSTANTS", "elementAcceptsTextInput", "el", "textInputTypes", "parseKeyCombinations", "keys", "useCode", "key", "keyParts", "fixedKey", "fixKey", "modifiers", "matchKeyCombination", "evt", "keyCombinations", "eventKey", "modifierKeys", "getModiferKeysString", "combination", "modifierString", "KeyboardShortcutFoundation", "_adapter", "evt", "elementAcceptsTextInput", "matchKeyCombination", "KEYBOARD_SHORTCUT_CONSTANTS", "parseKeyCombinations", "value", "KeyboardShortcutComponent", "BaseComponent", "KeyboardShortcutFoundation", "KeyboardShortcutAdapter", "KEYBOARD_SHORTCUT_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "value", "__decorateClass", "FoundationProperty", "CustomElement", "defineKeyboardShortcutComponent", "defineCustomElement", "KeyboardShortcutComponent"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as F}from"./chunk.FG2GNAM2.js";import{b as j}from"./chunk.FWFOOQMA.js";import{a as te}from"./chunk.W4247Q2P.js";import{h as pe,i as ae}from"./chunk.QCRRHGBA.js";import{c as ee}from"./chunk.F4VXEE76.js";import{e as Z}from"./chunk.HHCO64F3.js";import{b as Q}from"./chunk.ZKGSQQGU.js";import{a as C,e as ie}from"./chunk.7CGKFRBK.js";import{b as oe}from"./chunk.A62DE5PD.js";import{c as re}from"./chunk.WPG7NNQX.js";import{a as se,b as le}from"./chunk.OWCYRSI3.js";import{a as ne}from"./chunk.GO5A4GKZ.js";import{a as A}from"./chunk.MGLWXAZO.js";import{c as W,g as K,h as q}from"./chunk.FYWPZFLJ.js";import{d as Y,l as X,m as J}from"./chunk.PH3HUFJJ.js";import{a as z}from"./chunk.KVCDAZ6B.js";import{a as $}from"./chunk.ISC7SZSP.js";import{a}from"./chunk.NVUMRW44.js";import{a as R}from"./chunk.BKL2BAYW.js";import{a as H,b as G,c as V}from"./chunk.DXN7ZOH3.js";import{a as k,e as U,f as L}from"./chunk.MVTBJPO2.js";import{m as B,r as N,s as M,u as D}from"./chunk.K7FPXAFS.js";import{a as y,b as h,c as x,j as T,k as f,l as S,n as w,o as P}from"./chunk.J2M2MXP2.js";import{a as E,d as p}from"./chunk.M3QDAYD2.js";var g=`${G}autocomplete`,me={MODE:"mode",MULTIPLE:"multiple",DEBOUNCE:"debounce",FILTER_ON_FOCUS:"filter-on-focus",FILTER_FOCUS_FIRST:"filter-focus-first",ALLOW_UNMATCHED:"allow-unmatched",POPUP_TARGET:"popup-target",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",SYNC_POPUP_WIDTH:"sync-popup-width",OPEN:"open",MATCH_KEY:"match-key",FILTER_TEXT:"filter-text",DROPDOWN_ICON_OPEN:"data-forge-dropdown-icon-open"},fe={INPUT:ne.selectors.INPUT,DROPDOWN_ICON:"[data-forge-dropdown-icon],[data-forge-dropdown-icon],[forge-dropdown-icon],.forge-dropdown-icon",CLEAR_BUTTON:"[data-forge-autocomplete-clear],[forge-autocomplete-clear]"},ve={DEFAULT_DEBOUNCE_TIME:500,NUM_SKELETON_ITEMS:3},be={CHANGE:`${g}-change`,SELECT:`${g}-select`,SCROLLED_BOTTOM:`${g}-scrolled-bottom`},o={elementName:g,attributes:me,selectors:fe,numbers:ve,events:be},ue=(e=>(e.Default="default",e.Stateless="stateless",e))(ue||{});var O=class extends R{constructor(e){super(e);this.setInputElement()}setInputElement(){let e=N(this._component,o.selectors.INPUT,!1);return e.length&&(this._inputElement=e[0]),this._inputElement}setInputAttribute(e,t){this._inputElement.setAttribute(e,t)}addInputListener(e,t){this._inputElement.addEventListener(e,t)}removeInputListener(e,t){this._inputElement.removeEventListener(e,t)}initializeInputAccessibility(e){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","polite"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-autocomplete","list")}isWrappingChipField(){return!!this._component.querySelector(F.elementName)}show(e,t){this._targetElement=this._getTargetElement(t),this._targetElement&&(this._listDropdown=new pe(this._targetElement,e),this._listDropdown.open(),this._inputElement.setAttribute("aria-expanded","true"),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`),this._tryToggleDropdownIconRotation(!0))}hide(e){if(!this._listDropdown)return;let{targetElement:t}=this._listDropdown.dropdownElement;t.removeEventListener(C.events.BLUR,e),this.setBusyVisibility(!1),this._tryToggleDropdownIconRotation(!1),this._inputElement.removeAttribute("aria-activedescendant"),this._inputElement.removeAttribute("aria-controls"),this._inputElement.setAttribute("aria-expanded","false"),this._listDropdown.close(),this._listDropdown=void 0}setBusyVisibility(e){var t;(t=this._listDropdown)==null||t.setBusyVisibility(e)}setDismissListener(e){if(!this._listDropdown||!this._listDropdown.dropdownElement)return;let t=this._listDropdown.dropdownElement;t.targetElement&&t.targetElement.addEventListener(C.events.BLUR,e)}focus(){window.requestAnimationFrame(()=>this._inputElement.focus())}setOptions(e){var t;(t=this._listDropdown)==null||t.setOptions(e)}appendOptions(e){var t;(t=this._listDropdown)==null||t.appendOptions(e)}setSelectedText(e){this._inputElement.value=e}getInputValue(){return this._inputElement.value}setInputValue(e){this._inputElement.value=e}selectInputValue(){window.requestAnimationFrame(()=>this._inputElement.select())}isFocusWithinPopup(e){return!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._listDropdown.dropdownElement.contains(e)}hasFocus(){let e=M(this._component.ownerDocument);return e===this._inputElement||this.isFocusWithinPopup(e)}hasInputElement(){return!!this._inputElement}setDropdownIconListener(e,t){window.requestAnimationFrame(()=>{let i=this._component.querySelector(o.selectors.DROPDOWN_ICON);i&&i.addEventListener(e,t)})}removeDropdownIconListener(e,t){let i=this._component.querySelector(o.selectors.DROPDOWN_ICON);i&&i.removeEventListener(e,t)}setClearButtonListener(e,t){window.requestAnimationFrame(()=>{let i=this._component.querySelector(o.selectors.CLEAR_BUTTON);i&&i.addEventListener(e,t)})}removeClearButtonListener(e,t){let i=this._component.querySelector(o.selectors.CLEAR_BUTTON);i&&i.removeEventListener(e,t)}propagateKey(e){var t;(t=this._listDropdown)==null||t.handleKey(e)}updateActiveDescendant(e){this._targetElement&&D(this._inputElement,!!e,"aria-activedescendant",e)}getTargetElementWidth(e){return this._targetElement||(this._targetElement=this._getTargetElement(e)),this._targetElement.getBoundingClientRect().width}getPopupElement(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.dropdownElement)!=null?t:null}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}activateSelectedOption(){var e;(e=this._listDropdown)==null||e.activateSelectedOption()}activateOptionByIndex(e){var t;(t=this._listDropdown)==null||t.activateOption(e)}getActiveOptionIndex(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?t:null}clearActiveOption(){var e;(e=this._listDropdown)==null||e.clearActiveOption()}setSelectedOptions(e){if(this._listDropdown){let t=e.map(i=>i.value);this._listDropdown.setSelectedValues(t)}}queueDropdownPositionUpdate(){this.getPopupElement()&&window.requestAnimationFrame(()=>{let e=this.getPopupElement();e==null||e.position()})}_getTargetElement(e){return e?this._component.querySelector(e)||this._getDefaultTargetElement():this._getDefaultTargetElement()}_getDefaultTargetElement(){let e=this._component.querySelector("forge-text-field");if(e&&e.shadowRoot){let i=L(e,se.selectors.ROOT);if(i)return i}let t=this._component.querySelector("forge-chip-field");if(t&&t.shadowRoot){let i=L(t,F.selectors.ROOT);if(i)return i}return this._component.querySelector("input")||this._component}_tryToggleDropdownIconRotation(e){let t=this._component.querySelector(o.selectors.DROPDOWN_ICON);t&&D(t,e,o.attributes.DROPDOWN_ICON_OPEN)}};var de=(e=>(e[e.Option=0]="Option",e[e.Group=1]="Group",e))(de||{});function v(u,d){let e=u.some(i=>h(i)&&T(i)&&i.hasOwnProperty("options")&&(i.hasOwnProperty("text")||i.hasOwnProperty("builder"))),t=u.some(i=>h(i)&&T(i)&&i.hasOwnProperty("label")&&i.hasOwnProperty("value"));return e&&d===1||t&&d===0}function ce(u,d){return u.find(e=>e.value===d)}function b(u,d,e=null){return e?!(e in u.value)||!(e in d)?!1:w(u.value[e],d[e]):w(u.value,d)}var I=class extends ae{constructor(e){super();this._adapter=e;this._isInitialized=!1;this._isDropdownOpen=!1;this._mode="default";this._multiple=!1;this._debounce=o.numbers.DEFAULT_DEBOUNCE_TIME;this._allowUnmatched=!1;this._filterOnFocus=!0;this._filterFocusFirst=!0;this._options=[];this._filterText="";this._selectedOptions=[];this._values=[];this._pendingFilterPromises=[];this._matchKey=null;this._clickListener=t=>this._onClick(t),this._focusListener=()=>this._onFocus(),this._blurListener=t=>this._onBlur(t),this._keydownListener=t=>this._onKeydown(t),this._dropdownIconClickListener=t=>this._onDropdownIconClick(t),this._dropdownScrollEndListener=()=>this._onDropdownScrollEnd(),this._dropdownIconMouseDownListener=t=>this._onDropdownIconMouseDown(t),this._clearButtonListener=t=>this._onClear(t),this._dismissListener=()=>this._onDismiss(),this._activeChangeListener=t=>this._adapter.updateActiveDescendant(t),this._targetWidthCallback=()=>this._adapter.getTargetElementWidth(this._popupTarget),this._identifier=y()}async initialize(){if(!this._adapter.hasInputElement()&&!this._adapter.setInputElement())throw new Error("An input element is required as a child of the autocomplete component.");if(this._setInputListener(),this._setFilterCallback(),this._attachListeners(),this._initializeAccessibility(),this._values.length){if(!this._selectedOptions.length){try{await this._executeFilter()}catch(e){console.error(e)}this._updateSelectedOptions(this._values)}this._adapter.setSelectedText(this._getSelectedText())}this._isInitialized=!0}disconnect(){this._isInitialized&&(this._detachListeners(),this._isInitialized=!1),this._isDropdownOpen&&this._closeDropdown()}_attachListeners(){this._adapter.addInputListener("click",this._clickListener),this._adapter.addInputListener("focus",this._focusListener),this._adapter.addInputListener("blur",this._blurListener),this._adapter.addInputListener("input",this._inputListener),this._adapter.addInputListener("keydown",this._keydownListener),this._adapter.setDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.setDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.setClearButtonListener("click",this._clearButtonListener)}_detachListeners(){this._adapter.removeInputListener("click",this._clickListener),this._adapter.removeInputListener("focus",this._focusListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("keydown",this._keydownListener),this._adapter.removeDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.removeDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.removeClearButtonListener("click",this._clearButtonListener)}_setInputListener(){this._inputListener=e=>this._onInput(e)}_setFilterCallback(){this._filterFn=h(this._debounce)&&this._debounce>0?P(this._debounceFilter,this._debounce,!1):this._debounceFilter}_initializeAccessibility(){this._adapter.initializeInputAccessibility(this._identifier)}get _flatOptions(){return v(this._options,1)?this._options.reduce((e,t)=>e.concat(t.options),[]):this._options}_onClick(e){!this._isDropdownOpen&&this._filterOnFocus&&this._showDropdown()}_onDropdownIconMouseDown(e){e.preventDefault()}_onDropdownIconClick(e){this._isDropdownOpen?this._closeDropdown():(this._adapter.focus(),window.requestAnimationFrame(()=>this._showDropdown()))}_onClear(e){this._clearValue(),this._adapter.setSelectedText(this._getSelectedText())}_onDropdownScrollEnd(){this._adapter.emitHostEvent(o.events.SCROLLED_BOTTOM)}_onFocus(){!this._isDropdownOpen&&this._adapter.getInputValue()&&!A.isMobile&&this._adapter.selectInputValue()}_onBlur(e){this._adapter.isFocusWithinPopup(e.relatedTarget)||this._applyBlur()}_applyBlur(){this._isDropdownOpen&&this._closeDropdown(),this._mode!=="stateless"&&(this._selectedOptions.length?this._adapter.setSelectedText(this._getSelectedText()):this._allowUnmatched||(this._filterText="",this._adapter.setSelectedText("")))}_onInput(e){this._selectedOptions.length&&!this._multiple&&(!this._adapter.getInputValue()||this._allowUnmatched)&&!this._adapter.isWrappingChipField()&&(this._selectedOptions=[],this._values=[],this._emitChangeEvent()),this._filterText=this._adapter.getInputValue(),this._filterFn()}async _debounceFilter({checkFocus:e=!0}={}){if(!e&&!this._adapter.hasFocus()){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}let t=this._filterText,i=this._executeFilter();this._pendingFilterPromises.push(i),this._isDropdownOpen?this._adapter.setBusyVisibility(!0):this._showDropdown({filter:!1});try{await i}catch(n){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}if(t===this._filterText)this._pendingFilterPromises=[],this._onFilterComplete();else{let n=this._pendingFilterPromises.indexOf(i);n!==-1&&this._pendingFilterPromises.splice(n,1)}}_onKeydown(e){switch(e.key){case"Tab":this._isDropdownOpen&&!this._multiple&&this._selectActiveOption(!1);break;case"Esc":case"Escape":this._isDropdownOpen&&(e.preventDefault(),e.stopPropagation(),this._closeDropdown());break;case"Down":case"ArrowDown":e.preventDefault(),this._isDropdownOpen?this._adapter.propagateKey(e.key):this._showDropdown({activateFirst:!0,activateSelected:!0});break;case"Up":case"ArrowUp":e.preventDefault(),this._isDropdownOpen&&this._adapter.propagateKey(e.key);break;case"Enter":case"Home":case"End":this._isDropdownOpen&&(e.key==="Enter"&&e.stopPropagation(),e.preventDefault(),this._adapter.propagateKey(e.key));break;case"Backspace":case"Delete":let t=e.target,i=this._adapter.getInputValue(),n=t.value.substring(t.selectionStart,t.selectionEnd)===t.value,l=i.length===1&&t.selectionEnd===1,c=i.length===1&&t.selectionEnd===0,_=!i||n||l||c;!this._adapter.isWrappingChipField()&&_&&!this._multiple&&this._values.length&&this._clearValue();break}}_executeFilter(e=!0,t=!1){if(!this._filter||typeof this._filter!="function")throw new Error('A filter callback must be provided. Did you set the "filter" property?');let i=this._filter,n=e?this._filterText:"",l=t?this._getValue():null;return new Promise((c,_)=>Promise.resolve(i(n,l)).then(r=>{this._options=r,c(this._options)}).catch(r=>_(`An unexpected error occurred while filtering: ${r}`)))}_onFilterComplete(){if(!this._adapter.hasFocus()){this._isDropdownOpen&&this._closeDropdown();return}if(this._options.length){let e=this._allowUnmatched&&!this._selectedOptions.length;this._dropdownReady({userTriggered:e}),this._filterFocusFirst&&this._filterText&&this._adapter.activateFirstOption()}else this._closeDropdown()}_clearValue(){this._selectedOptions=[],this._values=[],this._isDropdownOpen&&(this._adapter.setSelectedOptions([]),this._adapter.clearActiveOption()),this._emitChangeEvent()}async _showDropdown({filter:e=!0,userTriggered:t=!0,activateFirst:i=!1,activateSelected:n=!1}={}){let l=this._allowUnmatched&&!this._selectedOptions.length;this._isDropdownOpen=!0;let c;if(this._optionBuilder){let r=this._optionBuilder;c=(m,_e)=>r(m,this._filterText,_e)}let _={options:this._options,multiple:this._multiple,selectedValues:[...this._values],id:`forge-autocomplete-${this._identifier}`,asyncStyle:"skeleton",optionLimit:this._optionLimit,popupClasses:this._popupClasses,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,transform:r=>{if(this._filterText){let m=$(r,this._filterText);if(m)return m}return r},allowBusy:!0,optionBuilder:c,syncWidth:this._syncPopupWidth,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,scrollEndListener:this._dropdownScrollEndListener,activeChangeCallback:this._activeChangeListener,targetWidthCallback:this._targetWidthCallback,selectCallback:r=>this._onSelect(r),closeCallback:()=>this._closeDropdown()};if(this._adapter.show(_,this._popupTarget),this._adapter.toggleHostAttribute(o.attributes.OPEN,this._isDropdownOpen),e){this._options.length&&this._adapter.setBusyVisibility(!0);try{await this._executeFilter(l)}catch(r){console.error(r)}this._updateSelectedOptions(this._values)}this._pendingFilterPromises.length||this._dropdownReady({userTriggered:t,activateFirst:i,activateSelected:n})}_dropdownReady({userTriggered:e=!0,activateFirst:t=!1,activateSelected:i=!1}={}){if(!this._isDropdownOpen||!this._options.length||e&&!this._adapter.hasFocus()){this._closeDropdown();return}this._sortSelectedOptions(),this._adapter.setBusyVisibility(!1),this._adapter.setOptions(this._options),this._adapter.setSelectedOptions(this._selectedOptions),this._adapter.setDismissListener(this._dismissListener),i&&this._selectedOptions.length?this._adapter.activateSelectedOption():t&&this._adapter.activateFirstOption()}_closeDropdown(){this._multiple&&(this._filterText=""),this._isDropdownOpen=!1,this._adapter.hide(this._dismissListener),this._sortSelectedOptions(),this._adapter.toggleHostAttribute(o.attributes.OPEN,this._isDropdownOpen)}_sortSelectedOptions(){if(this._multiple&&this._selectedOptions.length&&v(this._options,0)){let e=[],t=[];this._options.forEach(i=>{this._selectedOptions.find(n=>b(n,i.value,this._matchKey))?e.push(i):t.push(i)}),this._options=[...e,...t]}}async _onSelect(e,t=!0){if(this._valueChanging)return;if(this._mode==="stateless"){let n={value:e};this._adapter.emitHostEvent(o.events.SELECT,n,!0,!0)&&(this._filterText="",this._multiple||this._closeDropdown());return}let i=()=>{let l=this._flatOptions.find(r=>b(r,e,this._matchKey)),c=l?l.value:"",_=l?l.label:"";if(this._multiple){let r=ce(this._selectedOptions,c);if(r){let m=this._selectedOptions.indexOf(r);this._selectedOptions.splice(m,1)}else this._selectedOptions.push(l)}else h(c)?(this._selectedOptions[0]=l,this._filterText=_):(this._selectedOptions=[],this._filterText="");this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions),this._values=this._selectedOptions.map(r=>r.value),this._adapter.setSelectedText(this._getSelectedText()),!A.isMobile&&t&&this._adapter.selectInputValue(),this._emitChangeEvent(),this._tryUpdateDropdownPosition()};this._isDropdownOpen&&!this._multiple&&this._closeDropdown(),typeof this._beforeValueChange=="function"?(this._valueChanging=Promise.resolve(this._beforeValueChange.call(null,e,this._matchKey)),await this._valueChanging?i():this._tryUpdateDropdownPosition(),this._valueChanging=void 0):i()}_selectActiveOption(e=!0){let t=this._adapter.getActiveOptionIndex();if(typeof t=="number"&&t>=0){let i=this._flatOptions[t];i&&this._onSelect(i.value,e)}}_emitChangeEvent(){this._adapter.emitHostEvent(o.events.CHANGE,this._getValue(),!0)}_tryUpdateDropdownPosition(){this._isDropdownOpen&&this._adapter.queueDropdownPositionUpdate()}_getValue(){return this._values?this._values.length?this._multiple?[...this._values]:this._values[0]:this._multiple?[]:null:null}_getSelectedText(){var e,t;return this._adapter.isWrappingChipField()?"":this._selectedTextBuilder?this._selectedTextBuilder(this._selectedOptions):this._multiple?this._values.length?this._values.length===1?(t=(e=this._selectedOptions[0])==null?void 0:e.label)!=null?t:"":`${this._values.length} options selected`:"":this._selectedOptions.filter(i=>i&&i.label).map(i=>i.label).join(" ").trim()}_onDismiss(){this._closeDropdown()}async _applyValue(e){let t=[];this._selectedOptions=[],Array.isArray(e)?t=e:t=h(e)?[e]:[],!this._multiple&&t.length>1&&(t=[t[0]]),v(t,0)?(this._values=t.map(n=>n.value),this._selectedOptions=t):this._values=t;let i=this._flatOptions;if(t.length&&i.length&&this._updateSelectedOptions(t),this._values.length&&!this._selectedOptions.length&&this._filter&&this._isInitialized){try{await this._executeFilter(!1,!0)}catch(n){console.error(n)}this._updateSelectedOptions(this._values)}this._multiple?this._filterText="":this._filterText=this._selectedOptions.length?this._selectedOptions[0].label:"",this._isInitialized&&this._adapter.setSelectedText(this._getSelectedText()),this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions)}_updateSelectedOptions(e){let t=[...this._flatOptions,...this._selectedOptions];if(this._selectedOptions.length&&(this._selectedOptions=[]),v(e,0))for(let i of e){let n=t.find(l=>b(l,i.value,this._matchKey));n?this._selectedOptions.push(n):this._selectedOptions.push(i)}else for(let i of e){let n=t.find(l=>b(l,i,this._matchKey));n?this._selectedOptions.push(n):this._allowUnmatched&&this._selectedOptions.push({label:i,value:i})}}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._mode==="stateless"&&(this._selectedOptions=[],this._isDropdownOpen&&this._closeDropdown()),this._adapter.setHostAttribute(o.attributes.MODE,this._mode))}get multiple(){return this._multiple}set multiple(e){this._multiple!==e&&(this._multiple=e,this._adapter.setHostAttribute(o.attributes.MULTIPLE,h(this._multiple)?this._multiple.toString():""))}get value(){return this._getValue()}set value(e){let t=[];e==null?t=[]:Array.isArray(e)?t=JSON.parse(JSON.stringify(e)):x(e)?t=[e]:t=[JSON.parse(JSON.stringify(e))],(t.length!==this._values.length||t.some(n=>!this._values.includes(n)))&&this._applyValue(e)}get filterOnFocus(){return this._filterOnFocus}set filterOnFocus(e){this._filterOnFocus!==e&&(this._filterOnFocus=e,this._adapter.setHostAttribute(o.attributes.FILTER_ON_FOCUS,h(this._filterOnFocus)?this._filterOnFocus.toString():""))}get filterFocusFirst(){return this._filterFocusFirst}set filterFocusFirst(e){this._filterFocusFirst!==e&&(this._filterFocusFirst=e,this._adapter.toggleHostAttribute(o.attributes.FILTER_FOCUS_FIRST,this._filterFocusFirst))}get allowUnmatched(){return this._allowUnmatched}set allowUnmatched(e){this._allowUnmatched!==e&&(this._allowUnmatched=e,h(this._allowUnmatched)&&this._adapter.setHostAttribute(o.attributes.ALLOW_UNMATCHED,this._allowUnmatched.toString()))}get matchKey(){return this._matchKey}set matchKey(e){this._matchKey!==e&&(this._matchKey=e)}get popupTarget(){return this._popupTarget}set popupTarget(e){this._popupTarget!==e&&(this._popupTarget=e)}get filterText(){return this._filterText}set filterText(e){this._filterText!==e&&(this._filterText=this._allowUnmatched?e:"",this._isInitialized&&this._allowUnmatched&&(this._adapter.setInputValue(this._filterText),this._isDropdownOpen&&this._debounceFilter({checkFocus:!1})))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:[this._popupClasses]}set popupClasses(e){this._popupClasses!==e&&(this._popupClasses=Array.isArray(e)?[...e]:[e])}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}set popupFooterBuilder(e){this._popupFooterBuilder=e}get syncPopupWidth(){return this._syncPopupWidth}set syncPopupWidth(e){this._syncPopupWidth!==e&&(this._syncPopupWidth=e)}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit!==e&&(this._optionLimit=e)}get debounce(){return this._debounce}set debounce(e){this._debounce!==e&&(this._debounce=e,this._isInitialized&&this._setFilterCallback(),this._adapter.setHostAttribute(o.attributes.DEBOUNCE,h(this._debounce)?this._debounce.toString():""))}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get filter(){return this._filter}set filter(e){this._filter!==e&&(this._filter=e,this._isInitialized&&this._values.length&&!this._flatOptions.length&&this._filter&&this._executeFilter().then(()=>{this._updateSelectedOptions(this._values),this._adapter.setSelectedText(this._getSelectedText())}))}get selectedTextBuilder(){return this._selectedTextBuilder}set selectedTextBuilder(e){this._selectedTextBuilder=e,this._selectedOptions.length&&this._adapter.setSelectedText(this._getSelectedText())}get observeScroll(){return this._observeScroll}set observeScroll(e){this._observeScroll=e}get observeScrollThreshold(){return this._observeScrollThreshold}set observeScrollThreshold(e){this._observeScrollThreshold=e}appendOptions(e){this._isDropdownOpen&&(this._options=[...this._options,...e],this._adapter.appendOptions(e))}get isInitialized(){return this._isInitialized}get open(){return this._isDropdownOpen}set open(e){this._isDropdownOpen!==e&&(e?this._showDropdown({userTriggered:!1}):this._closeDropdown())}get beforeValueChange(){return this._beforeValueChange}set beforeValueChange(e){e!==this._beforeValueChange&&(this._beforeValueChange=e)}get popupElement(){return this._adapter.getPopupElement()}};var ge="<template><slot></slot></template>",Oe=":host{display:block}:host([hidden]){display:none}",s=class extends te{constructor(){super();Y.define([W,q,K]),U(this,ge,Oe),this._foundation=new I(new O(this))}static get observedAttributes(){return[o.attributes.MODE,o.attributes.MULTIPLE,o.attributes.DEBOUNCE,o.attributes.FILTER_ON_FOCUS,o.attributes.FILTER_FOCUS_FIRST,o.attributes.ALLOW_UNMATCHED,o.attributes.POPUP_TARGET,o.attributes.POPUP_CLASSES,o.attributes.OBSERVE_SCROLL,o.attributes.OBSERVE_SCROLL_THRESHOLD,o.attributes.OPTION_LIMIT,o.attributes.SYNC_POPUP_WIDTH,o.attributes.OPEN,o.attributes.MATCH_KEY,o.attributes.FILTER_TEXT]}connectedCallback(){this.querySelector(o.selectors.INPUT)?this._foundation.initialize():B(this,o.selectors.INPUT).then(()=>this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,t,i){switch(super.attributeChangedCallback(e,t,i),e){case o.attributes.MODE:this.mode=i;break;case o.attributes.MULTIPLE:this.multiple=f(i);break;case o.attributes.DEBOUNCE:this.debounce=S(i);break;case o.attributes.FILTER_ON_FOCUS:this.filterOnFocus=f(i);break;case o.attributes.FILTER_FOCUS_FIRST:this.filterFocusFirst=f(i);break;case o.attributes.ALLOW_UNMATCHED:this.allowUnmatched=f(i);break;case o.attributes.POPUP_TARGET:this.popupTarget=i;break;case o.attributes.OPEN:this.open=f(i);break;case o.attributes.MATCH_KEY:this.matchKey=i;break;case o.attributes.FILTER_TEXT:this.filterText=i;break}}appendOptions(e){this._foundation.appendOptions(e)}openDropdown(){this.open=!0}closeDropdown(){this.open=!1}};p([a()],s.prototype,"mode",2),p([a()],s.prototype,"multiple",2),p([a()],s.prototype,"value",2),p([a()],s.prototype,"debounce",2),p([a()],s.prototype,"filterOnFocus",2),p([a()],s.prototype,"filterFocusFirst",2),p([a()],s.prototype,"allowUnmatched",2),p([a()],s.prototype,"popupTarget",2),p([a()],s.prototype,"filterText",2),p([a()],s.prototype,"optionBuilder",2),p([a()],s.prototype,"filter",2),p([a()],s.prototype,"selectedTextBuilder",2),p([a()],s.prototype,"open",2),p([a()],s.prototype,"matchKey",2),p([a({set:!1})],s.prototype,"isInitialized",2),p([a({set:!1})],s.prototype,"popupElement",2),p([a()],s.prototype,"beforeValueChange",2),s=p([H({name:o.elementName,dependencies:[re,ie,ee,Z,j,oe,Q,X]})],s);var he=class extends z{constructor(e){super(e)}_build(){let e=document.createElement(o.elementName);return this._attachTextField(e),e}get textFieldDelegate(){return this._textFieldDelegate}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._textFieldDelegate.inputElement.disabled}set disabled(e){this._textFieldDelegate.inputElement.disabled=e}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(e){this._textFieldDelegate.invalid=e}onChange(e){this._element.addEventListener(o.events.CHANGE,t=>e(t.detail))}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",t=>e(t))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",t=>e(t))}_attachTextField(e){var i,n,l,c,_,r;let t={props:E({},(n=(i=this._config.options)==null?void 0:i.textFieldDelegateConfig)==null?void 0:n.props),options:E({},(c=(l=this._config.options)==null?void 0:l.textFieldDelegateConfig)==null?void 0:c.options)};t.options||(t.options={}),((_=this._config.options)==null?void 0:_.useDropdownIcon)!==!1&&!((r=t.options)!=null&&r.trailingElement)&&(t.options.trailingElement=this._createDropdownIconElement()),this._textFieldDelegate=new le(t),e.appendChild(this._textFieldDelegate.element)}_createDropdownIconElement(){let e={props:{slot:"trailing",name:"arrow_drop_down"},options:{attributes:{"forge-dropdown-icon":""}}};return new J(e).element}};function Gt(){k(s)}export{o as a,ue as b,O as c,de as d,v as e,ce as f,b as g,I as h,s as i,he as j,Gt as k};
|
|
7
|
-
//# sourceMappingURL=chunk.DBNJHUYY.js.map
|