@mhmo91/schmancy 0.7.1 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{animated-text-C7RzcmyV.js → animated-text-BFlc2Dxw.js} +3 -3
- package/dist/{animated-text-C7RzcmyV.js.map → animated-text-BFlc2Dxw.js.map} +1 -1
- package/dist/{animated-text-B8pXfnjg.cjs → animated-text-Ha4oAANq.cjs} +2 -2
- package/dist/{animated-text-B8pXfnjg.cjs.map → animated-text-Ha4oAANq.cjs.map} +1 -1
- package/dist/animated-text.cjs +1 -1
- package/dist/animated-text.js +1 -1
- package/dist/area.cjs +1 -1
- package/dist/{area.component-DfGcGjsN.js → area.component-Bka65tDs.js} +3 -3
- package/dist/{area.component-DfGcGjsN.js.map → area.component-Bka65tDs.js.map} +1 -1
- package/dist/{area.component-TRIJcSoQ.cjs → area.component-CKsrcDRn.cjs} +2 -2
- package/dist/{area.component-TRIJcSoQ.cjs.map → area.component-CKsrcDRn.cjs.map} +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-Dio0lk_E.cjs → autocomplete-B_1GqRUR.cjs} +2 -2
- package/dist/{autocomplete-Dio0lk_E.cjs.map → autocomplete-B_1GqRUR.cjs.map} +1 -1
- package/dist/{autocomplete-Bhv2JOnL.js → autocomplete-DZkEFTEZ.js} +4 -4
- package/dist/{autocomplete-Bhv2JOnL.js.map → autocomplete-DZkEFTEZ.js.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-BCLeThlA.js → avatar-DtekXmcU.js} +51 -51
- package/dist/{avatar-BCLeThlA.js.map → avatar-DtekXmcU.js.map} +1 -1
- package/dist/{avatar-DecX7RJw.cjs → avatar-qq14bs9t.cjs} +2 -2
- package/dist/{avatar-DecX7RJw.cjs.map → avatar-qq14bs9t.cjs.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-B3IhIJhy.cjs → boat-BMkLrXTL.cjs} +2 -2
- package/dist/{boat-B3IhIJhy.cjs.map → boat-BMkLrXTL.cjs.map} +1 -1
- package/dist/{boat-DrAkyCAd.js → boat-DZoxLvZC.js} +3 -3
- package/dist/{boat-DrAkyCAd.js.map → boat-DZoxLvZC.js.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-C4CHTajr.cjs → checkbox-0VoZZa4h.cjs} +2 -2
- package/dist/{checkbox-C4CHTajr.cjs.map → checkbox-0VoZZa4h.cjs.map} +1 -1
- package/dist/{checkbox-BKT1cZnv.js → checkbox-CQx4HYwJ.js} +2 -2
- package/dist/{checkbox-BKT1cZnv.js.map → checkbox-CQx4HYwJ.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{code-preview-DzMETSJv.js → code-preview-DEGx3kQB.js} +2 -2
- package/dist/{code-preview-DzMETSJv.js.map → code-preview-DEGx3kQB.js.map} +1 -1
- package/dist/{code-preview-CEbRCvUd.cjs → code-preview-Dl_M5GR8.cjs} +2 -2
- package/dist/{code-preview-CEbRCvUd.cjs.map → code-preview-Dl_M5GR8.cjs.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-B-5LtvhH.js → date-range--yEeeHCf.js} +3 -3
- package/dist/{date-range-B-5LtvhH.js.map → date-range--yEeeHCf.js.map} +1 -1
- package/dist/{date-range-B1PGOR7h.cjs → date-range-CvTDLehP.cjs} +2 -2
- package/dist/{date-range-B1PGOR7h.cjs.map → date-range-CvTDLehP.cjs.map} +1 -1
- package/dist/{date-range-inline-D90CpK7z.js → date-range-inline-CIVzMnQn.js} +3 -3
- package/dist/{date-range-inline-D90CpK7z.js.map → date-range-inline-CIVzMnQn.js.map} +1 -1
- package/dist/{date-range-inline-DLV7jB_x.cjs → date-range-inline-Dnljq_BA.cjs} +2 -2
- package/dist/{date-range-inline-DLV7jB_x.cjs.map → date-range-inline-Dnljq_BA.cjs.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-UAjkp-21.cjs → delay-CACWxGqn.cjs} +2 -2
- package/dist/{delay-UAjkp-21.cjs.map → delay-CACWxGqn.cjs.map} +1 -1
- package/dist/{delay-D5RAR00M.js → delay-DwCdeYuL.js} +2 -2
- package/dist/{delay-D5RAR00M.js.map → delay-DwCdeYuL.js.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{details-RHTdNCLS.cjs → details-CCoS9xd8.cjs} +2 -2
- package/dist/{details-RHTdNCLS.cjs.map → details-CCoS9xd8.cjs.map} +1 -1
- package/dist/{details-CiuixU2H.js → details-DGb0xqNr.js} +2 -2
- package/dist/{details-CiuixU2H.js.map → details-DGb0xqNr.js.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{dialog-content-dtIrTHLU.js → dialog-content-B2JVKPqi.js} +3 -3
- package/dist/{dialog-content-dtIrTHLU.js.map → dialog-content-B2JVKPqi.js.map} +1 -1
- package/dist/{dialog-content-BF1xiYWw.cjs → dialog-content-i87I9rQk.cjs} +2 -2
- package/dist/{dialog-content-BF1xiYWw.cjs.map → dialog-content-i87I9rQk.cjs.map} +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/{divider-ZhcWRyc2.cjs → divider-CacIbNwO.cjs} +2 -2
- package/dist/{divider-ZhcWRyc2.cjs.map → divider-CacIbNwO.cjs.map} +1 -1
- package/dist/{divider-DcEB9uHV.js → divider-vQSomcaK.js} +3 -3
- package/dist/{divider-DcEB9uHV.js.map → divider-vQSomcaK.js.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-BoUnfAyz.js → dropdown-content-DQWxgudU.js} +3 -3
- package/dist/{dropdown-content-BoUnfAyz.js.map → dropdown-content-DQWxgudU.js.map} +1 -1
- package/dist/{dropdown-content-klaWLDI-.cjs → dropdown-content-M1rD9kJj.cjs} +2 -2
- package/dist/{dropdown-content-klaWLDI-.cjs.map → dropdown-content-M1rD9kJj.cjs.map} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{email-recipients-yN1Jcu9X.js → email-recipients-BEWJbqMn.js} +6 -6
- package/dist/{email-recipients-yN1Jcu9X.js.map → email-recipients-BEWJbqMn.js.map} +1 -1
- package/dist/{email-recipients-DA2HLG8K.cjs → email-recipients-CmJzkoy6.cjs} +2 -2
- package/dist/{email-recipients-DA2HLG8K.cjs.map → email-recipients-CmJzkoy6.cjs.map} +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{flex-CYCtLC7W.cjs → flex-Bjwz-HnJ.cjs} +2 -2
- package/dist/{flex-CYCtLC7W.cjs.map → flex-Bjwz-HnJ.cjs.map} +1 -1
- package/dist/{flex-C_fGjgWC.js → flex-C0ZdKa-V.js} +2 -2
- package/dist/{flex-C_fGjgWC.js.map → flex-C0ZdKa-V.js.map} +1 -1
- package/dist/{form-CYBgxvdH.cjs → form-lqIXYGSt.cjs} +2 -2
- package/dist/{form-CYBgxvdH.cjs.map → form-lqIXYGSt.cjs.map} +1 -1
- package/dist/{form-Dn3XWE7d.js → form-zZ9K6dHM.js} +2 -2
- package/dist/{form-Dn3XWE7d.js.map → form-zZ9K6dHM.js.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{formField.mixin-Ds2S1kRc.js → formField.mixin-DCxn2nDa.js} +2 -2
- package/dist/{formField.mixin-Ds2S1kRc.js.map → formField.mixin-DCxn2nDa.js.map} +1 -1
- package/dist/{formField.mixin-D_gQgJXC.cjs → formField.mixin-d4a9NzW1.cjs} +2 -2
- package/dist/{formField.mixin-D_gQgJXC.cjs.map → formField.mixin-d4a9NzW1.cjs.map} +1 -1
- package/dist/{icon-Bw8hqRtQ.js → icon-BKURK4cc.js} +2 -2
- package/dist/{icon-Bw8hqRtQ.js.map → icon-BKURK4cc.js.map} +1 -1
- package/dist/{icon-DYGsNRVu.cjs → icon-DgMwU6Sh.cjs} +2 -2
- package/dist/{icon-DYGsNRVu.cjs.map → icon-DgMwU6Sh.cjs.map} +1 -1
- package/dist/{icon-button-BfjcTNKq.cjs → icon-button-BFBXcA0v.cjs} +2 -2
- package/dist/{icon-button-BfjcTNKq.cjs.map → icon-button-BFBXcA0v.cjs.map} +1 -1
- package/dist/{icon-button-Cu-RShdY.js → icon-button-BWGNtLD5.js} +3 -3
- package/dist/{icon-button-Cu-RShdY.js.map → icon-button-BWGNtLD5.js.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +50 -50
- package/dist/{input-D-YRT2vo.cjs → input-DJvCQHXx.cjs} +2 -2
- package/dist/{input-D-YRT2vo.cjs.map → input-DJvCQHXx.cjs.map} +1 -1
- package/dist/{input-UlrGLoXt.js → input-SdlMv4FP.js} +3 -3
- package/dist/{input-UlrGLoXt.js.map → input-SdlMv4FP.js.map} +1 -1
- package/dist/{input-chip-pho9bYvS.cjs → input-chip-DHLxhM-i.cjs} +2 -2
- package/dist/{input-chip-pho9bYvS.cjs.map → input-chip-DHLxhM-i.cjs.map} +1 -1
- package/dist/{input-chip-BwEuJAV5.js → input-chip-PI7UwDJM.js} +2 -2
- package/dist/{input-chip-BwEuJAV5.js.map → input-chip-PI7UwDJM.js.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{list-CyCR5ywg.cjs → list-4y3Bcw_L.cjs} +2 -2
- package/dist/{list-CyCR5ywg.cjs.map → list-4y3Bcw_L.cjs.map} +1 -1
- package/dist/{list-B4x432bs.js → list-BuiXWlhv.js} +2 -2
- package/dist/{list-B4x432bs.js.map → list-BuiXWlhv.js.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-BPe38Tqd.js → litElement.mixin-Bx-YfcU2.js} +2 -2
- package/dist/{litElement.mixin-BPe38Tqd.js.map → litElement.mixin-Bx-YfcU2.js.map} +1 -1
- package/dist/{litElement.mixin-DXaT0TQx.cjs → litElement.mixin-Dtw9qaJn.cjs} +2 -2
- package/dist/{litElement.mixin-DXaT0TQx.cjs.map → litElement.mixin-Dtw9qaJn.cjs.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-C2fG3es8.cjs → map-BbLSj4Pp.cjs} +2 -2
- package/dist/{map-C2fG3es8.cjs.map → map-BbLSj4Pp.cjs.map} +1 -1
- package/dist/{map-CNoi0TZi.js → map-Cfiud6nO.js} +2 -2
- package/dist/{map-CNoi0TZi.js.map → map-Cfiud6nO.js.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{media-D_ne5TmT.js → media-DB2g1n05.js} +2 -2
- package/dist/{media-D_ne5TmT.js.map → media-DB2g1n05.js.map} +1 -1
- package/dist/{media-dMr54ISj.cjs → media-Dy-pnYxM.cjs} +2 -2
- package/dist/{media-dMr54ISj.cjs.map → media-Dy-pnYxM.cjs.map} +1 -1
- package/dist/menu-B5LqArNO.js +61 -0
- package/dist/menu-B5LqArNO.js.map +1 -0
- package/dist/menu-BoXnSAf7.cjs +24 -0
- package/dist/menu-BoXnSAf7.cjs.map +1 -0
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +3 -3
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/{navigation-rail-DfFgV2PX.cjs → navigation-rail-DF4-60eF.cjs} +2 -2
- package/dist/{navigation-rail-DfFgV2PX.cjs.map → navigation-rail-DF4-60eF.cjs.map} +1 -1
- package/dist/{navigation-rail-DM2NQY_2.js → navigation-rail-wry6dTCG.js} +3 -3
- package/dist/{navigation-rail-DM2NQY_2.js.map → navigation-rail-wry6dTCG.js.map} +1 -1
- package/dist/navigation-rail.cjs +1 -1
- package/dist/navigation-rail.js +1 -1
- package/dist/{notification-service-Cm_0BsnA.cjs → notification-service-DqeHvJJJ.cjs} +2 -2
- package/dist/{notification-service-Cm_0BsnA.cjs.map → notification-service-DqeHvJJJ.cjs.map} +1 -1
- package/dist/{notification-service-DDfyKN2r.js → notification-service-xmGhXVEJ.js} +4 -4
- package/dist/{notification-service-DDfyKN2r.js.map → notification-service-xmGhXVEJ.js.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +2 -2
- package/dist/{notify-BGHQRbsD.js → notify-BR9D2TiK.js} +2 -2
- package/dist/{notify-BGHQRbsD.js.map → notify-BR9D2TiK.js.map} +1 -1
- package/dist/{notify-DMoBBADS.cjs → notify-C5HEjOEP.cjs} +2 -2
- package/dist/{notify-DMoBBADS.cjs.map → notify-C5HEjOEP.cjs.map} +1 -1
- package/dist/{option-MaqD_vGw.cjs → option-DBV7IAxP.cjs} +2 -2
- package/dist/{option-MaqD_vGw.cjs.map → option-DBV7IAxP.cjs.map} +1 -1
- package/dist/{option-EBGoYClu.js → option-DS1NWVVP.js} +2 -2
- package/dist/{option-EBGoYClu.js.map → option-DS1NWVVP.js.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{payment-card-form-DZmaLaVl.cjs → payment-card-form-BJooohMJ.cjs} +2 -2
- package/dist/{payment-card-form-DZmaLaVl.cjs.map → payment-card-form-BJooohMJ.cjs.map} +1 -1
- package/dist/{payment-card-form-p_Wj1NRm.js → payment-card-form-BpDjIGpf.js} +3 -3
- package/dist/{payment-card-form-p_Wj1NRm.js.map → payment-card-form-BpDjIGpf.js.map} +1 -1
- package/dist/{progress-BqIOFoJX.cjs → progress-DKBw83JW.cjs} +2 -2
- package/dist/{progress-BqIOFoJX.cjs.map → progress-DKBw83JW.cjs.map} +1 -1
- package/dist/{progress-DC88fksT.js → progress-DWtRzL3_.js} +2 -2
- package/dist/{progress-DC88fksT.js.map → progress-DWtRzL3_.js.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-button-BfpkkEgE.cjs → radio-button-BxN-7CRZ.cjs} +2 -2
- package/dist/{radio-button-BfpkkEgE.cjs.map → radio-button-BxN-7CRZ.cjs.map} +1 -1
- package/dist/{radio-button-DQA5Kswx.js → radio-button-Uv2rHJG4.js} +3 -3
- package/dist/{radio-button-DQA5Kswx.js.map → radio-button-Uv2rHJG4.js.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{schmancy-steps-container-Br5qKWIs.js → schmancy-steps-container-BM10FUOA.js} +2 -2
- package/dist/{schmancy-steps-container-Br5qKWIs.js.map → schmancy-steps-container-BM10FUOA.js.map} +1 -1
- package/dist/{schmancy-steps-container-Cr2B9C-w.cjs → schmancy-steps-container-Bc1d-op6.cjs} +2 -2
- package/dist/{schmancy-steps-container-Cr2B9C-w.cjs.map → schmancy-steps-container-Bc1d-op6.cjs.map} +1 -1
- package/dist/{select-DwaiJBG2.cjs → select-CfZPs5yA.cjs} +2 -2
- package/dist/{select-DwaiJBG2.cjs.map → select-CfZPs5yA.cjs.map} +1 -1
- package/dist/{select-B_DaDLhe.js → select-DR4yXzR0.js} +3 -3
- package/dist/{select-B_DaDLhe.js.map → select-DR4yXzR0.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-5c6WR3vS.js → sheet-D5cujyVW.js} +5 -5
- package/dist/{sheet-5c6WR3vS.js.map → sheet-D5cujyVW.js.map} +1 -1
- package/dist/{sheet-BrK8_X4J.cjs → sheet-Dtj0_7Kk.cjs} +2 -2
- package/dist/{sheet-BrK8_X4J.cjs.map → sheet-Dtj0_7Kk.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/{sheet.service-BkKHvgFa.cjs → sheet.service-AsrLLW-7.cjs} +2 -2
- package/dist/{sheet.service-BkKHvgFa.cjs.map → sheet.service-AsrLLW-7.cjs.map} +1 -1
- package/dist/{sheet.service-EPEmcCpX.js → sheet.service-M8PMUUgc.js} +2 -2
- package/dist/{sheet.service-EPEmcCpX.js.map → sheet.service-M8PMUUgc.js.map} +1 -1
- package/dist/{slider-DW9URxIY.cjs → slider-B4GUyZqU.cjs} +2 -2
- package/dist/{slider-DW9URxIY.cjs.map → slider-B4GUyZqU.cjs.map} +1 -1
- package/dist/{slider-CiNvtgZJ.js → slider-C6LcofBD.js} +3 -3
- package/dist/{slider-CiNvtgZJ.js.map → slider-C6LcofBD.js.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-9JRrKdub.cjs → spinner-BHnxNdlk.cjs} +2 -2
- package/dist/{spinner-9JRrKdub.cjs.map → spinner-BHnxNdlk.cjs.map} +1 -1
- package/dist/{spinner-D8stZ8uP.js → spinner-CcRNBMvJ.js} +2 -2
- package/dist/{spinner-D8stZ8uP.js.map → spinner-CcRNBMvJ.js.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/{suggestion-chip-inBIBMff.cjs → suggestion-chip-BdSNOe03.cjs} +2 -2
- package/dist/{suggestion-chip-inBIBMff.cjs.map → suggestion-chip-BdSNOe03.cjs.map} +1 -1
- package/dist/{suggestion-chip-CXPMf7Je.js → suggestion-chip-DVScnCxJ.js} +3 -3
- package/dist/{suggestion-chip-CXPMf7Je.js.map → suggestion-chip-DVScnCxJ.js.map} +1 -1
- package/dist/{surface-BsrV4kzE.cjs → surface-CxTEeZl9.cjs} +2 -2
- package/dist/{surface-BsrV4kzE.cjs.map → surface-CxTEeZl9.cjs.map} +1 -1
- package/dist/{surface-BcZEnDON.js → surface-xeatGhRa.js} +2 -2
- package/dist/{surface-BcZEnDON.js.map → surface-xeatGhRa.js.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-CzejyN5W.cjs → table-BDoBA49H.cjs} +2 -2
- package/dist/{table-CzejyN5W.cjs.map → table-BDoBA49H.cjs.map} +1 -1
- package/dist/{table-B5CHKp8S.js → table-CoztXQq4.js} +2 -2
- package/dist/{table-B5CHKp8S.js.map → table-CoztXQq4.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-UitZoxcs.cjs → tabs-compatibility-BO5a2_1S.cjs} +2 -2
- package/dist/{tabs-compatibility-UitZoxcs.cjs.map → tabs-compatibility-BO5a2_1S.cjs.map} +1 -1
- package/dist/{tabs-compatibility-8NddfF1x.js → tabs-compatibility-DVO94tDv.js} +2 -2
- package/dist/{tabs-compatibility-8NddfF1x.js.map → tabs-compatibility-DVO94tDv.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-7Zryjmgw.cjs +2 -0
- package/dist/{tailwind.mixin-2PdnHg0B.cjs.map → tailwind.mixin-7Zryjmgw.cjs.map} +1 -1
- package/dist/tailwind.mixin-DqSYbdpb.js +67 -0
- package/dist/{tailwind.mixin-BgdEBNZM.js.map → tailwind.mixin-DqSYbdpb.js.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-2oVdZPXR.js → textarea-BAvMG2X9.js} +2 -2
- package/dist/{textarea-2oVdZPXR.js.map → textarea-BAvMG2X9.js.map} +1 -1
- package/dist/{textarea-D24UakyK.cjs → textarea-BYryibzf.cjs} +2 -2
- package/dist/{textarea-D24UakyK.cjs.map → textarea-BYryibzf.cjs.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-D0Xi4WHC.cjs → theme-button-U_pvbRUN.cjs} +2 -2
- package/dist/{theme-button-D0Xi4WHC.cjs.map → theme-button-U_pvbRUN.cjs.map} +1 -1
- package/dist/{theme-button-D4BhpOj6.js → theme-button-xscoLGo8.js} +2 -2
- package/dist/{theme-button-D4BhpOj6.js.map → theme-button-xscoLGo8.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/{theme-controller-boat-C8AnrOkJ.js → theme-controller-boat-CBRV8Lxv.js} +3 -3
- package/dist/{theme-controller-boat-C8AnrOkJ.js.map → theme-controller-boat-CBRV8Lxv.js.map} +1 -1
- package/dist/{theme-controller-boat-r74J3tyl.cjs → theme-controller-boat-Cu_42DVG.cjs} +2 -2
- package/dist/{theme-controller-boat-r74J3tyl.cjs.map → theme-controller-boat-Cu_42DVG.cjs.map} +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timezone-D4wUA6zL.js → timezone-0VQbGKGw.js} +3 -3
- package/dist/{timezone-D4wUA6zL.js.map → timezone-0VQbGKGw.js.map} +1 -1
- package/dist/{timezone-BbGoZoJM.cjs → timezone-BY79gIHy.cjs} +2 -2
- package/dist/{timezone-BbGoZoJM.cjs.map → timezone-BY79gIHy.cjs.map} +1 -1
- package/dist/{tooltip-DxdU3Drr.cjs → tooltip-CZ2GERET.cjs} +2 -2
- package/dist/{tooltip-DxdU3Drr.cjs.map → tooltip-CZ2GERET.cjs.map} +1 -1
- package/dist/{tooltip-BL92Hwwe.js → tooltip-DQvySABb.js} +2 -2
- package/dist/{tooltip-BL92Hwwe.js.map → tooltip-DQvySABb.js.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-BuGpk0as.cjs → tree-B-WLxCyF.cjs} +2 -2
- package/dist/{tree-BuGpk0as.cjs.map → tree-B-WLxCyF.cjs.map} +1 -1
- package/dist/{tree-cZIPOana.js → tree-Don7mV2c.js} +2 -2
- package/dist/{tree-cZIPOana.js.map → tree-Don7mV2c.js.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-Dc7MHBRy.cjs → typewriter-DxBpGHo6.cjs} +2 -2
- package/dist/{typewriter-Dc7MHBRy.cjs.map → typewriter-DxBpGHo6.cjs.map} +1 -1
- package/dist/{typewriter-DT0f_Fla.js → typewriter-mw2viHm5.js} +4 -4
- package/dist/{typewriter-DT0f_Fla.js.map → typewriter-mw2viHm5.js.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-DayYVIRD.js → typography-BW88WILG.js} +2 -2
- package/dist/{typography-DayYVIRD.js.map → typography-BW88WILG.js.map} +1 -1
- package/dist/{typography-BBCRpsA_.cjs → typography-Cqnp2hjE.cjs} +2 -2
- package/dist/{typography-BBCRpsA_.cjs.map → typography-Cqnp2hjE.cjs.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/mixins/baseElement.ts +73 -0
- package/mixins/constructor.ts +3 -0
- package/mixins/discovery.service.ts +60 -0
- package/mixins/formField.mixin.ts +223 -0
- package/mixins/index.ts +5 -0
- package/mixins/litElement.mixin.ts +15 -0
- package/mixins/scss.d.ts +21 -0
- package/mixins/tailwind.css +201 -0
- package/mixins/tailwind.mixin.ts +30 -0
- package/package.json +4 -3
- package/types/src/menu/menu.d.ts +30 -5
- package/dist/menu-BdWhwHXc.js +0 -89
- package/dist/menu-BdWhwHXc.js.map +0 -1
- package/dist/menu-BsX4Mjjn.cjs +0 -23
- package/dist/menu-BsX4Mjjn.cjs.map +0 -1
- package/dist/tailwind.mixin-2PdnHg0B.cjs +0 -2
- package/dist/tailwind.mixin-BgdEBNZM.js +0 -67
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option-
|
|
1
|
+
{"version":3,"file":"option-DS1NWVVP.js","sources":["../src/option/option.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { fromEvent, takeUntil } from 'rxjs'\n\n/**\n * `schmancy-option` is an option element for schmancy-select and schmancy-autocomplete components.\n *\n * @fires click - When the option is clicked\n */\n@customElement('schmancy-option')\nexport default class SchmancyOption extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tcursor: pointer;\n\t\tuser-select: none;\n\t\toutline: none;\n\t}\n\n\t:host(:focus-visible) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: -2px;\n\t}\n\n\t:host([hidden]) {\n\t\tdisplay: none;\n\t}\n\n\t:host([disabled]) {\n\t\topacity: 0.5;\n\t\tpointer-events: none;\n\t}\n`) {\n\t/**\n\t * The value of the option, will be used when selected.\n\t */\n\t@property({ type: String })\n\tvalue: string = ''\n\n\t/**\n\t * The human-readable label for the option.\n\t */\n\t@property({ type: String })\n\tlabel: string = ''\n\n\t/**\n\t * Whether the option is currently selected.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tselected: boolean = false\n\n\t/**\n\t * Whether the option is disabled.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled: boolean = false\n\n\t/**\n\t * Optional group this option belongs to (for option grouping).\n\t */\n\t@property({ type: String })\n\tgroup: string = ''\n\n\t/**\n\t * Optional icon or image to display before the label.\n\t */\n\t@property({ type: String })\n\ticon: string = ''\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Ensure the option has an ID for accessibility\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-option-${Math.random().toString(36).substring(2, 9)}`\n\t\t}\n\n\t\t// If no label was provided, use the text content or value\n\t\tif (!this.label) {\n\t\t\tthis.label = this.textContent?.trim() || this.value\n\t\t}\n\n\t\t// If value wasn't set but there's text content, use that as the value\n\t\tif (!this.value && this.textContent) {\n\t\t\tthis.value = this.textContent.trim()\n\t\t}\n\n\t\t// Make the option clickable\n\t\tfromEvent<MouseEvent>(this, 'click')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tif (this.disabled) return\n\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\n\t\tfromEvent<KeyboardEvent>(this, 'keydown')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\t// Handle space and enter as clicks\n\t\t\t\tif (e.key === ' ' || e.key === 'Enter') {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\tif (this.disabled) return\n\t\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\tdisconnectedCallback() {\n\t\t// Event listeners are automatically cleaned up via takeUntil(this.disconnecting)\n\t\tsuper.disconnectedCallback()\n\t}\n\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'py-2': true,\n\t\t\t'px-3': true,\n\t\t\trounded: true,\n\t\t\t'text-sm': true,\n\t\t\t'w-full': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t// Selected state\n\t\t\t'bg-primary-container': this.selected,\n\t\t\t'text-primary-onContainer': this.selected,\n\t\t\t// Hover state (when not selected)\n\t\t\t'hover:bg-surface-high': !this.selected,\n\t\t\t// Focus state\n\t\t\t'focus:outline-none': true,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=${this.classMap(classes)} role=\"option\" aria-selected=${this.selected} aria-disabled=${this.disabled}>\n\t\t\t\t${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : ''}\n\t\t\t\t<span class=\"flex-1\">${this.label || this.value}</span>\n\t\t\t\t${this.selected\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<span class=\"check\">\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<polyline points=\"20 6 9 17 4 12\"></polyline>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-option': SchmancyOption\n\t}\n}\n"],"names":["SchmancyOption","TailwindElement","css","super","arguments","this","value","label","selected","disabled","group","icon","connectedCallback","id","Math","random","toString","substring","textContent","trim","fromEvent","pipe","takeUntil","disconnecting","subscribe","e","stopPropagation","dispatchEvent","CustomEvent","bubbles","composed","detail","key","preventDefault","disconnectedCallback","render","classes","rounded","flex","html","classMap","__decorateClass","property","type","String","prototype","Boolean","reflect","customElement"],"mappings":";;;;;;;;;;;AAWA,IAAqBA,IAArB,cAA4CC,EAAgBC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAA5D,EAAA;AAAA,EAAA;AAAAC,UAAAA,GAAAC,SAAAA,GA0BCC,KAAAC,QAAgB,IAMhBD,KAAAE,QAAgB,IAMhBF,KAAAG,eAMAH,KAAAI,eAMAJ,KAAAK,QAAgB,IAMhBL,KAAAM,OAAe;AAAA,EAAA;AAAA,EAEf,oBAAAC;AACCT,UAAMS,kBAAAA,GAGDP,KAAKQ,OACTR,KAAKQ,KAAK,mBAAmBC,KAAKC,OAAAA,EAASC,SAAS,IAAIC,UAAU,GAAG,OAIjEZ,KAAKE,UACTF,KAAKE,QAAQF,KAAKa,aAAaC,KAAAA,KAAUd,KAAKC,QAAAA,CAI1CD,KAAKC,SAASD,KAAKa,gBACvBb,KAAKC,QAAQD,KAAKa,YAAYC,SAI/BC,EAAsBf,MAAM,SAC1BgB,KAAKC,EAAUjB,KAAKkB,aAAAA,CAAAA,EACpBC,UAAWC,CAAAA,MAAAA;AACXA,MAAAA,EAAEC,gBAAAA,GACErB,KAAKI,YAETJ,KAAKsB,cACJ,IAAIC,YAAY,iBAAiB,EAChCC,SAAAA,IACAC,UAAAA,IACAC,QAAQ,EAAEzB,OAAOD,KAAKC,MAAAA,EAAAA,CAAAA,CAAAA;AAAAA,IAAAA,CAAAA,GAK1Bc,EAAyBf,MAAM,SAAA,EAC7BgB,KAAKC,EAAUjB,KAAKkB,aAAAA,CAAAA,EACpBC,UAAWC,CAAAA,MAAAA;AAEX,UAAIA,EAAEO,QAAQ,OAAOP,EAAEO,QAAQ,SAAS;AAGvC,YAFAP,EAAEQ,eAAAA,GACFR,EAAEC,mBACErB,KAAKI,SAAU;AAEnBJ,aAAKsB,cACJ,IAAIC,YAAY,iBAAiB,EAChCC,aACAC,UAAAA,IACAC,QAAQ,EAAEzB,OAAOD,KAAKC,MAAAA,EAAAA,CAAAA,CAAAA;AAAAA,MAGzB;AAAA,IAAA,CAAA;AAAA,EAEH;AAAA,EAEA,uBAAA4B;AAEC/B,UAAM+B,qBAAAA;AAAAA,EACP;AAAA,EAGA,SAAAC;AACC,UAAMC,IAAU,EACf,YACA,QAAA,IACAC,SAAAA,IACA,eACA,UAAA,IACAC,MAAAA,IACA,gBAAA,IACA,SAAA,IAEA,wBAAwBjC,KAAKG,UAC7B,4BAA4BH,KAAKG,UAEjC,yBAAA,CAA0BH,KAAKG,UAE/B,sBAAA,GAAsB;AAGvB,WAAO+B;AAAAA,gBACOlC,KAAKmC,SAASJ,CAAAA,CAAAA,gCAAwC/B,KAAKG,QAAAA,kBAA0BH,KAAKI,QAAAA;AAAAA,MACpGJ,KAAKM,OAAO4B,uBAA0BlC,KAAKM,IAAAA,YAAgB,EAAA;AAAA,2BACtCN,KAAKE,SAASF,KAAKC,KAAAA;AAAAA,MACxCD,KAAKG,WACJ+B;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,UAgBA,EAAA;AAAA;AAAA;AAAA,EAGN;AAAA;AAvIAE,EAAA,CADCC,EAAS,EAAEC,MAAMC,OAAAA,CAAAA,CAAAA,GAzBE5C,EA0BpB6C,WAAA,SAAA,CAAA,GAMAJ,EAAA,CADCC,EAAS,EAAEC,MAAMC,OAAAA,CAAAA,CAAAA,GA/BE5C,EAgCpB6C,WAAA,SAAA,CAAA,GAMAJ,EAAA,CADCC,EAAS,EAAEC,MAAMG,SAASC,SAAAA,GAAS,CAAA,CAAA,GArChB/C,EAsCpB6C,WAAA,YAAA,IAMAJ,EAAA,CADCC,EAAS,EAAEC,MAAMG,SAASC,SAAAA,GAAS,CAAA,CAAA,GA3ChB/C,EA4CpB6C,WAAA,YAAA,CAAA,GAMAJ,EAAA,CADCC,EAAS,EAAEC,MAAMC,YAjDE5C,EAkDpB6C,WAAA,SAAA,CAAA,GAMAJ,EAAA,CADCC,EAAS,EAAEC,MAAMC,OAAAA,CAAAA,CAAAA,GAvDE5C,EAwDpB6C,WAAA,QAAA,CAAA,GAxDoB7C,IAArByC,EAAA,CADCO,EAAc,iBAAA,CAAA,GACMhD,CAAAA;"}
|
package/dist/option.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("./option-
|
|
1
|
+
"use strict";require("./option-DBV7IAxP.cjs");
|
|
2
2
|
//# sourceMappingURL=option.cjs.map
|
package/dist/option.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./option-
|
|
1
|
+
import "./option-DS1NWVVP.js";
|
|
2
2
|
//# sourceMappingURL=option.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";require("rxjs"),require("rxjs/operators"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const h=require("lit/decorators.js");require("./tailwind.mixin-2PdnHg0B.cjs");const w=require("./litElement.mixin-DXaT0TQx.cjs"),D=require("lit");var x=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},v=function(e,t,r,i,a,n,o,l,d,p){var s=this;s.numeralDecimalMark=e||".",s.numeralIntegerScale=t>0?t:0,s.numeralDecimalScale=r>=0?r:2,s.numeralThousandsGroupStyle=i||v.groupStyle.thousand,s.numeralPositiveOnly=!!a,s.stripLeadingZeroes=n!==!1,s.prefix=o||o===""?o:"",s.signBeforePrefix=!!l,s.tailPrefix=!!d,s.delimiter=p||p===""?p:",",s.delimiterRE=p?new RegExp("\\"+p,"g"):""};v.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"},v.prototype={getRawValue:function(e){return e.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(e){var t,r,i,a,n=this,o="";switch(e=e.replace(/[A-Za-z]/g,"").replace(n.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",n.numeralPositiveOnly?"":"-").replace("M",n.numeralDecimalMark),n.stripLeadingZeroes&&(e=e.replace(/^(-)?0+(?=\d)/,"$1")),r=e.slice(0,1)==="-"?"-":"",i=n.prefix!==void 0?n.signBeforePrefix?r+n.prefix:n.prefix+r:r,a=e,e.indexOf(n.numeralDecimalMark)>=0&&(a=(t=e.split(n.numeralDecimalMark))[0],o=n.numeralDecimalMark+t[1].slice(0,n.numeralDecimalScale)),r==="-"&&(a=a.slice(1)),n.numeralIntegerScale>0&&(a=a.slice(0,n.numeralIntegerScale)),n.numeralThousandsGroupStyle){case v.groupStyle.lakh:a=a.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+n.delimiter);break;case v.groupStyle.wan:a=a.replace(/(\d)(?=(\d{4})+$)/g,"$1"+n.delimiter);break;case v.groupStyle.thousand:a=a.replace(/(\d)(?=(\d{3})+$)/g,"$1"+n.delimiter)}return n.tailPrefix?r+a.toString()+(n.numeralDecimalScale>0?o.toString():"")+n.prefix:i+a.toString()+(n.numeralDecimalScale>0?o.toString():"")}};var k=v,F=function(e,t,r){var i=this;i.date=[],i.blocks=[],i.datePattern=e,i.dateMin=t.split("-").reverse().map(function(a){return parseInt(a,10)}),i.dateMin.length===2&&i.dateMin.unshift(0),i.dateMax=r.split("-").reverse().map(function(a){return parseInt(a,10)}),i.dateMax.length===2&&i.dateMax.unshift(0),i.initBlocks()};F.prototype={initBlocks:function(){var e=this;e.datePattern.forEach(function(t){t==="Y"?e.blocks.push(4):e.blocks.push(2)})},getISOFormatDate:function(){var e=this,t=e.date;return t[2]?t[2]+"-"+e.addLeadingZero(t[1])+"-"+e.addLeadingZero(t[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(e){var t=this,r="";return e=e.replace(/[^\d]/g,""),t.blocks.forEach(function(i,a){if(e.length>0){var n=e.slice(0,i),o=n.slice(0,1),l=e.slice(i);switch(t.datePattern[a]){case"d":n==="00"?n="01":parseInt(o,10)>3?n="0"+o:parseInt(n,10)>31&&(n="31");break;case"m":n==="00"?n="01":parseInt(o,10)>1?n="0"+o:parseInt(n,10)>12&&(n="12")}r+=n,e=l}}),this.getFixedDateString(r)},getFixedDateString:function(e){var t,r,i,a=this,n=a.datePattern,o=[],l=0,d=0,p=0,s=0,u=0,m=0,y=!1;return e.length===4&&n[0].toLowerCase()!=="y"&&n[1].toLowerCase()!=="y"&&(u=2-(s=n[0]==="d"?0:2),t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),o=this.getFixedDate(t,r,0)),e.length===8&&(n.forEach(function(f,C){switch(f){case"d":l=C;break;case"m":d=C;break;default:p=C}}),m=2*p,s=l<=p?2*l:2*l+2,u=d<=p?2*d:2*d+2,t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+4),10),y=e.slice(m,m+4).length===4,o=this.getFixedDate(t,r,i)),e.length!==4||n[0]!=="y"&&n[1]!=="y"||(m=2-(u=n[0]==="m"?0:2),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),y=e.slice(m,m+2).length===2,o=[0,r,i]),e.length!==6||n[0]!=="Y"&&n[1]!=="Y"||(m=2-.5*(u=n[0]==="m"?0:4),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+4),10),y=e.slice(m,m+4).length===4,o=[0,r,i]),o=a.getRangeFixedDate(o),a.date=o,o.length===0?e:n.reduce(function(f,C){switch(C){case"d":return f+(o[0]===0?"":a.addLeadingZero(o[0]));case"m":return f+(o[1]===0?"":a.addLeadingZero(o[1]));case"y":return f+(y?a.addLeadingZeroForYear(o[2],!1):"");case"Y":return f+(y?a.addLeadingZeroForYear(o[2],!0):"")}},"")},getRangeFixedDate:function(e){var t=this,r=t.datePattern,i=t.dateMin||[],a=t.dateMax||[];return!e.length||i.length<3&&a.length<3||r.find(function(n){return n.toLowerCase()==="y"})&&e[2]===0?e:a.length&&(a[2]<e[2]||a[2]===e[2]&&(a[1]<e[1]||a[1]===e[1]&&a[0]<e[0]))?a:i.length&&(i[2]>e[2]||i[2]===e[2]&&(i[1]>e[1]||i[1]===e[1]&&i[0]>e[0]))?i:e},getFixedDate:function(e,t,r){return e=Math.min(e,31),t=Math.min(t,12),r=parseInt(r||0,10),(t<7&&t%2==0||t>8&&t%2==1)&&(e=Math.min(e,t===2?this.isLeapYear(r)?29:28:30)),[e,t,r]},isLeapYear:function(e){return e%4==0&&e%100!=0||e%400==0},addLeadingZero:function(e){return(e<10?"0":"")+e},addLeadingZeroForYear:function(e,t){return t?(e<10?"000":e<100?"00":e<1e3?"0":"")+e:(e<10?"0":"")+e}};var V=F,P=function(e,t){var r=this;r.time=[],r.blocks=[],r.timePattern=e,r.timeFormat=t,r.initBlocks()};P.prototype={initBlocks:function(){var e=this;e.timePattern.forEach(function(){e.blocks.push(2)})},getISOFormatTime:function(){var e=this,t=e.time;return t[2]?e.addLeadingZero(t[0])+":"+e.addLeadingZero(t[1])+":"+e.addLeadingZero(t[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){return String(this.timeFormat)==="12"?{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}:{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(e){var t=this,r="";e=e.replace(/[^\d]/g,"");var i=t.getTimeFormatOptions();return t.blocks.forEach(function(a,n){if(e.length>0){var o=e.slice(0,a),l=o.slice(0,1),d=e.slice(a);switch(t.timePattern[n]){case"h":parseInt(l,10)>i.maxHourFirstDigit?o="0"+l:parseInt(o,10)>i.maxHours&&(o=i.maxHours+"");break;case"m":case"s":parseInt(l,10)>i.maxMinutesFirstDigit?o="0"+l:parseInt(o,10)>i.maxMinutes&&(o=i.maxMinutes+"")}r+=o,e=d}}),this.getFixedTimeString(r)},getFixedTimeString:function(e){var t,r,i,a=this,n=a.timePattern,o=[],l=0,d=0,p=0,s=0,u=0,m=0;return e.length===6&&(n.forEach(function(y,f){switch(y){case"s":l=2*f;break;case"m":d=2*f;break;case"h":p=2*f}}),m=p,u=d,s=l,t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),o=this.getFixedTime(i,r,t)),e.length===4&&a.timePattern.indexOf("s")<0&&(n.forEach(function(y,f){switch(y){case"m":d=2*f;break;case"h":p=2*f}}),m=p,u=d,t=0,r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),o=this.getFixedTime(i,r,t)),a.time=o,o.length===0?e:n.reduce(function(y,f){switch(f){case"s":return y+a.addLeadingZero(o[2]);case"m":return y+a.addLeadingZero(o[1]);case"h":return y+a.addLeadingZero(o[0])}},"")},getFixedTime:function(e,t,r){return r=Math.min(parseInt(r||0,10),60),t=Math.min(t,60),[e=Math.min(e,60),t,r]},addLeadingZero:function(e){return(e<10?"0":"")+e}};var L=P,I=function(e,t){var r=this;r.delimiter=t||t===""?t:" ",r.delimiterRE=t?new RegExp("\\"+t,"g"):"",r.formatter=e};I.prototype={setFormatter:function(e){this.formatter=e},format:function(e){var t=this;t.formatter.clear();for(var r,i="",a=!1,n=0,o=(e=(e=(e=e.replace(/[^\d+]/g,"")).replace(/^\+/,"B").replace(/\+/g,"").replace("B","+")).replace(t.delimiterRE,"")).length;n<o;n++)r=t.formatter.inputDigit(e.charAt(n)),/[\s()-]/g.test(r)?(i=r,a=!0):a||(i=r);return i=(i=i.replace(/[()]/g,"")).replace(/[\s-]/g,t.delimiter)}};var M=I,b={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^(62|81)\d{0,14}/},getStrictBlocks:function(e){var t=e.reduce(function(r,i){return r+i},0);return e.concat(19-t)},getInfo:function(e,t){var r=b.blocks,i=b.re;for(var a in t=!!t,i)if(i[a].test(e)){var n=r[a];return{type:a,blocks:t?this.getStrictBlocks(n):n}}return{type:"unknown",blocks:t?this.getStrictBlocks(r.general):r.general}}},N=b,E={noop:function(){},strip:function(e,t){return e.replace(t,"")},getPostDelimiter:function(e,t,r){if(r.length===0)return e.slice(-t.length)===t?t:"";var i="";return r.forEach(function(a){e.slice(-a.length)===a&&(i=a)}),i},getDelimiterREByDelimiter:function(e){return new RegExp(e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g")},getNextCursorPosition:function(e,t,r,i,a){return t.length===e?r.length:e+this.getPositionOffset(e,t,r,i,a)},getPositionOffset:function(e,t,r,i,a){var n,o,l;return n=this.stripDelimiters(t.slice(0,e),i,a),o=this.stripDelimiters(r.slice(0,e),i,a),(l=n.length-o.length)!==0?l/Math.abs(l):0},stripDelimiters:function(e,t,r){var i=this;if(r.length===0){var a=t?i.getDelimiterREByDelimiter(t):"";return e.replace(a,"")}return r.forEach(function(n){n.split("").forEach(function(o){e=e.replace(i.getDelimiterREByDelimiter(o),"")})}),e},headStr:function(e,t){return e.slice(0,t)},getMaxLength:function(e){return e.reduce(function(t,r){return t+r},0)},getPrefixStrippedValue:function(e,t,r,i,a,n,o,l,d){if(r===0)return e;if(e===t&&e!=="")return"";if(d&&e.slice(0,1)=="-"){var p=i.slice(0,1)=="-"?i.slice(1):i;return"-"+this.getPrefixStrippedValue(e.slice(1),t,r,p,a,n,o,l,d)}if(i.slice(0,r)!==t&&!l||i.slice(-r)!==t&&l)return o&&!i&&e?e:"";var s=this.stripDelimiters(i,a,n);return e.slice(0,r)===t||l?e.slice(-r)!==t&&l?s.slice(0,-r-1):l?e.slice(0,-r):e.slice(r):s.slice(r)},getFirstDiffIndex:function(e,t){for(var r=0;e.charAt(r)===t.charAt(r);)if(e.charAt(r++)==="")return-1;return r},getFormattedValue:function(e,t,r,i,a,n){var o="",l=a.length>0,d="";return r===0?e:(t.forEach(function(p,s){if(e.length>0){var u=e.slice(0,p),m=e.slice(p);d=l?a[n?s-1:s]||d:i,n?(s>0&&(o+=d),o+=u):(o+=u,u.length===p&&s<r-1&&(o+=d)),e=m}}),o)},fixPrefixCursor:function(e,t,r,i){if(e){var a=e.value,n=r||i[0]||" ";if(e.setSelectionRange&&t&&!(t.length+n.length<=a.length)){var o=2*a.length;setTimeout(function(){e.setSelectionRange(o,o)},1)}}},checkFullSelection:function(e){try{return(window.getSelection()||document.getSelection()||{}).toString().length===e.length}catch{}return!1},setSelection:function(e,t,r){if(e===this.getActiveElement(r)&&!(e&&e.value.length<=t))if(e.createTextRange){var i=e.createTextRange();i.move("character",t),i.select()}else try{e.setSelectionRange(t,t)}catch{}},getActiveElement:function(e){var t=e.activeElement;return t&&t.shadowRoot?this.getActiveElement(t.shadowRoot):t},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(e,t){return!!(this.isAndroid()&&e&&t)&&t===e.slice(0,-1)}},T={assign:function(e,t){return t=t||{},(e=e||{}).creditCard=!!t.creditCard,e.creditCardStrictMode=!!t.creditCardStrictMode,e.creditCardType="",e.onCreditCardTypeChanged=t.onCreditCardTypeChanged||function(){},e.phone=!!t.phone,e.phoneRegionCode=t.phoneRegionCode||"AU",e.phoneFormatter={},e.time=!!t.time,e.timePattern=t.timePattern||["h","m","s"],e.timeFormat=t.timeFormat||"24",e.timeFormatter={},e.date=!!t.date,e.datePattern=t.datePattern||["d","m","Y"],e.dateMin=t.dateMin||"",e.dateMax=t.dateMax||"",e.dateFormatter={},e.numeral=!!t.numeral,e.numeralIntegerScale=t.numeralIntegerScale>0?t.numeralIntegerScale:0,e.numeralDecimalScale=t.numeralDecimalScale>=0?t.numeralDecimalScale:2,e.numeralDecimalMark=t.numeralDecimalMark||".",e.numeralThousandsGroupStyle=t.numeralThousandsGroupStyle||"thousand",e.numeralPositiveOnly=!!t.numeralPositiveOnly,e.stripLeadingZeroes=t.stripLeadingZeroes!==!1,e.signBeforePrefix=!!t.signBeforePrefix,e.tailPrefix=!!t.tailPrefix,e.swapHiddenInput=!!t.swapHiddenInput,e.numericOnly=e.creditCard||e.date||!!t.numericOnly,e.uppercase=!!t.uppercase,e.lowercase=!!t.lowercase,e.prefix=e.creditCard||e.date?"":t.prefix||"",e.noImmediatePrefix=!!t.noImmediatePrefix,e.prefixLength=e.prefix.length,e.rawValueTrimPrefix=!!t.rawValueTrimPrefix,e.copyDelimiter=!!t.copyDelimiter,e.initValue=t.initValue!==void 0&&t.initValue!==null?t.initValue.toString():"",e.delimiter=t.delimiter||t.delimiter===""?t.delimiter:t.date?"/":t.time?":":t.numeral?",":(t.phone," "),e.delimiterLength=e.delimiter.length,e.delimiterLazyShow=!!t.delimiterLazyShow,e.delimiters=t.delimiters||[],e.blocks=t.blocks||[],e.blocksLength=e.blocks.length,e.root=typeof x=="object"&&x?x:window,e.document=t.document||e.root.document,e.maxLength=0,e.backspace=!1,e.result="",e.onValueChanged=t.onValueChanged||function(){},e}},c=function(e,t){var r=this;if(typeof e=="string"?(r.element=document.querySelector(e),document.querySelectorAll(e).length>1):e.length!==void 0&&e.length>0?(r.element=e[0],e.length>1):r.element=e,!r.element)throw new Error("[cleave.js] Please check the element");t.initValue=r.element.value,r.properties=c.DefaultProperties.assign({},t),r.init()};c.prototype={init:function(){var e=this,t=e.properties;t.numeral||t.phone||t.creditCard||t.time||t.date||t.blocksLength!==0||t.prefix?(t.maxLength=c.Util.getMaxLength(t.blocks),e.isAndroid=c.Util.isAndroid(),e.lastInputValue="",e.isBackward="",e.onChangeListener=e.onChange.bind(e),e.onKeyDownListener=e.onKeyDown.bind(e),e.onFocusListener=e.onFocus.bind(e),e.onCutListener=e.onCut.bind(e),e.onCopyListener=e.onCopy.bind(e),e.initSwapHiddenInput(),e.element.addEventListener("input",e.onChangeListener),e.element.addEventListener("keydown",e.onKeyDownListener),e.element.addEventListener("focus",e.onFocusListener),e.element.addEventListener("cut",e.onCutListener),e.element.addEventListener("copy",e.onCopyListener),e.initPhoneFormatter(),e.initDateFormatter(),e.initTimeFormatter(),e.initNumeralFormatter(),(t.initValue||t.prefix&&!t.noImmediatePrefix)&&e.onInput(t.initValue)):e.onInput(t.initValue)},initSwapHiddenInput:function(){var e=this;if(e.properties.swapHiddenInput){var t=e.element.cloneNode(!0);e.element.parentNode.insertBefore(t,e.element),e.elementSwapHidden=e.element,e.elementSwapHidden.type="hidden",e.element=t,e.element.id=""}},initNumeralFormatter:function(){var e=this.properties;e.numeral&&(e.numeralFormatter=new c.NumeralFormatter(e.numeralDecimalMark,e.numeralIntegerScale,e.numeralDecimalScale,e.numeralThousandsGroupStyle,e.numeralPositiveOnly,e.stripLeadingZeroes,e.prefix,e.signBeforePrefix,e.tailPrefix,e.delimiter))},initTimeFormatter:function(){var e=this.properties;e.time&&(e.timeFormatter=new c.TimeFormatter(e.timePattern,e.timeFormat),e.blocks=e.timeFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=c.Util.getMaxLength(e.blocks))},initDateFormatter:function(){var e=this.properties;e.date&&(e.dateFormatter=new c.DateFormatter(e.datePattern,e.dateMin,e.dateMax),e.blocks=e.dateFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=c.Util.getMaxLength(e.blocks))},initPhoneFormatter:function(){var e=this.properties;if(e.phone)try{e.phoneFormatter=new c.PhoneFormatter(new e.root.Cleave.AsYouTypeFormatter(e.phoneRegionCode),e.delimiter)}catch{throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(e){var t=this,r=e.which||e.keyCode;t.lastInputValue=t.element.value,t.isBackward=r===8},onChange:function(e){var t=this,r=t.properties,i=c.Util;t.isBackward=t.isBackward||e.inputType==="deleteContentBackward";var a=i.getPostDelimiter(t.lastInputValue,r.delimiter,r.delimiters);t.isBackward&&a?r.postDelimiterBackspace=a:r.postDelimiterBackspace=!1,this.onInput(this.element.value)},onFocus:function(){var e=this,t=e.properties;e.lastInputValue=e.element.value,t.prefix&&t.noImmediatePrefix&&!e.element.value&&this.onInput(t.prefix),c.Util.fixPrefixCursor(e.element,t.prefix,t.delimiter,t.delimiters)},onCut:function(e){c.Util.checkFullSelection(this.element.value)&&(this.copyClipboardData(e),this.onInput(""))},onCopy:function(e){c.Util.checkFullSelection(this.element.value)&&this.copyClipboardData(e)},copyClipboardData:function(e){var t=this.properties,r=c.Util,i=this.element.value,a="";a=t.copyDelimiter?i:r.stripDelimiters(i,t.delimiter,t.delimiters);try{e.clipboardData?e.clipboardData.setData("Text",a):window.clipboardData.setData("Text",a),e.preventDefault()}catch{}},onInput:function(e){var t=this,r=t.properties,i=c.Util,a=i.getPostDelimiter(e,r.delimiter,r.delimiters);return r.numeral||!r.postDelimiterBackspace||a||(e=i.headStr(e,e.length-r.postDelimiterBackspace.length)),r.phone?(!r.prefix||r.noImmediatePrefix&&!e.length?r.result=r.phoneFormatter.format(e):r.result=r.prefix+r.phoneFormatter.format(e).slice(r.prefix.length),void t.updateValueState()):r.numeral?(r.prefix&&r.noImmediatePrefix&&e.length===0?r.result="":r.result=r.numeralFormatter.format(e),void t.updateValueState()):(r.date&&(e=r.dateFormatter.getValidatedDate(e)),r.time&&(e=r.timeFormatter.getValidatedTime(e)),e=i.stripDelimiters(e,r.delimiter,r.delimiters),e=i.getPrefixStrippedValue(e,r.prefix,r.prefixLength,r.result,r.delimiter,r.delimiters,r.noImmediatePrefix,r.tailPrefix,r.signBeforePrefix),e=r.numericOnly?i.strip(e,/[^\d]/g):e,e=r.uppercase?e.toUpperCase():e,e=r.lowercase?e.toLowerCase():e,r.prefix&&(r.tailPrefix?e+=r.prefix:e=r.prefix+e,r.blocksLength===0)?(r.result=e,void t.updateValueState()):(r.creditCard&&t.updateCreditCardPropsByValue(e),e=i.headStr(e,r.maxLength),r.result=i.getFormattedValue(e,r.blocks,r.blocksLength,r.delimiter,r.delimiters,r.delimiterLazyShow),void t.updateValueState()))},updateCreditCardPropsByValue:function(e){var t,r=this.properties,i=c.Util;i.headStr(r.result,4)!==i.headStr(e,4)&&(t=c.CreditCardDetector.getInfo(e,r.creditCardStrictMode),r.blocks=t.blocks,r.blocksLength=r.blocks.length,r.maxLength=i.getMaxLength(r.blocks),r.creditCardType!==t.type&&(r.creditCardType=t.type,r.onCreditCardTypeChanged.call(this,r.creditCardType)))},updateValueState:function(){var e=this,t=c.Util,r=e.properties;if(e.element){var i=e.element.selectionEnd,a=e.element.value,n=r.result;i=t.getNextCursorPosition(i,a,n,r.delimiter,r.delimiters),e.isAndroid?window.setTimeout(function(){e.element.value=n,t.setSelection(e.element,i,r.document,!1),e.callOnValueChanged()},1):(e.element.value=n,r.swapHiddenInput&&(e.elementSwapHidden.value=e.getRawValue()),t.setSelection(e.element,i,r.document,!1),e.callOnValueChanged())}},callOnValueChanged:function(){var e=this,t=e.properties;t.onValueChanged.call(e,{target:{name:e.element.name,value:t.result,rawValue:e.getRawValue()}})},setPhoneRegionCode:function(e){var t=this;t.properties.phoneRegionCode=e,t.initPhoneFormatter(),t.onChange()},setRawValue:function(e){var t=this,r=t.properties;e=e!=null?e.toString():"",r.numeral&&(e=e.replace(".",r.numeralDecimalMark)),r.postDelimiterBackspace=!1,t.element.value=e,t.onInput(e)},getRawValue:function(){var e=this.properties,t=c.Util,r=this.element.value;return e.rawValueTrimPrefix&&(r=t.getPrefixStrippedValue(r,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)),r=e.numeral?e.numeralFormatter.getRawValue(r):t.stripDelimiters(r,e.delimiter,e.delimiters)},getISOFormatDate:function(){var e=this.properties;return e.date?e.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var e=this.properties;return e.time?e.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var e=this;e.element.removeEventListener("input",e.onChangeListener),e.element.removeEventListener("keydown",e.onKeyDownListener),e.element.removeEventListener("focus",e.onFocusListener),e.element.removeEventListener("cut",e.onCutListener),e.element.removeEventListener("copy",e.onCopyListener)},toString:function(){return"[Cleave Object]"}},c.NumeralFormatter=k,c.DateFormatter=V,c.TimeFormatter=L,c.PhoneFormatter=M,c.CreditCardDetector=N,c.Util=E,c.DefaultProperties=T,(typeof x=="object"&&x?x:window).Cleave=c;var S=c,B=Object.defineProperty,R=Object.getOwnPropertyDescriptor,g=(e,t,r,i)=>{for(var a,n=i>1?void 0:i?R(t,r):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(i?a(t,r,n):a(n))||n);return i&&n&&B(t,r,n),n};exports.SchmancyPaymentCardForm=class extends w.$LitElement(){constructor(){super(...arguments),this.value={cardName:"",cardNumber:"",expirationDate:"",cvv:""},this.cardType="",this.isCardNameValid=!0,this.isCardNumberValid=!0,this.isExpirationDateValid=!0,this.isCvvValid=!0}firstUpdated(){new S(this.cardNumberInput,{creditCard:!0,creditCardStrictMode:!0,onCreditCardTypeChanged:e=>{this.cardType=e,e==="unknown"?(this.isCardNumberValid=!1,this.cardNumberInput.setCustomValidity("Please enter a valid card number."),this.cardNumberInput.error=!0):(this.isCardNumberValid=!0,this.cardNumberInput.setCustomValidity(""),this.cardNumberInput.error=!1,this.cvvInput.maxlength=e==="amex"?4:3)}}),new S(this.expirationDateInput,{date:!0,datePattern:["m","y"],onValueChanged:e=>{const t=e.target.value;if(!t||t.length<5)this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity("Please enter a valid expiration date (MM/YY)."),this.expirationDateInput.error=!0;else{const[r,i]=t.split("/"),a=new Date,n=a.getFullYear()%100,o=a.getMonth()+1,l=parseInt(r,10),d=parseInt(i,10);d<n||d===n&&l<o?(this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity("Card has expired."),this.expirationDateInput.error=!0):(this.isExpirationDateValid=!0,this.expirationDateInput.setCustomValidity(""),this.expirationDateInput.error=!1)}}}),new S(this.cvvInput,{blocks:[4],numericOnly:!0,onValueChanged:e=>{const t=this.cardType==="amex"?4:3;e.target.value.length<t?(this.isCvvValid=!1,this.cvvInput.setCustomValidity(`Please enter a valid ${t}-digit CVV.`),this.cvvInput.error=!0):(this.isCvvValid=!0,this.cvvInput.setCustomValidity(""),this.cvvInput.error=!1)}}),new S(this.cardNameInput,{uppercase:!0,delimiter:" ",onValueChanged:e=>{!e.target.value||e.target.value.length<3?(this.isCardNameValid=!1,this.cardNameInput.setCustomValidity("Please enter the name as it appears on the card."),this.cardNameInput.error=!0):(this.isCardNameValid=!0,this.cardNameInput.setCustomValidity(""),this.cardNameInput.error=!1)}})}reportValidity(){return this.form.reportValidity()}checkValidity(){return!!this.form.reportValidity()}emitChange(){this.dispatchEvent(new CustomEvent("change",{detail:{...this.value},bubbles:!0}))}render(){const e=this.getCardIcon();return D.html`
|
|
1
|
+
"use strict";require("rxjs"),require("rxjs/operators"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const h=require("lit/decorators.js");require("./tailwind.mixin-7Zryjmgw.cjs");const w=require("./litElement.mixin-Dtw9qaJn.cjs"),D=require("lit");var x=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},v=function(e,t,r,i,a,n,o,l,d,p){var s=this;s.numeralDecimalMark=e||".",s.numeralIntegerScale=t>0?t:0,s.numeralDecimalScale=r>=0?r:2,s.numeralThousandsGroupStyle=i||v.groupStyle.thousand,s.numeralPositiveOnly=!!a,s.stripLeadingZeroes=n!==!1,s.prefix=o||o===""?o:"",s.signBeforePrefix=!!l,s.tailPrefix=!!d,s.delimiter=p||p===""?p:",",s.delimiterRE=p?new RegExp("\\"+p,"g"):""};v.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"},v.prototype={getRawValue:function(e){return e.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(e){var t,r,i,a,n=this,o="";switch(e=e.replace(/[A-Za-z]/g,"").replace(n.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",n.numeralPositiveOnly?"":"-").replace("M",n.numeralDecimalMark),n.stripLeadingZeroes&&(e=e.replace(/^(-)?0+(?=\d)/,"$1")),r=e.slice(0,1)==="-"?"-":"",i=n.prefix!==void 0?n.signBeforePrefix?r+n.prefix:n.prefix+r:r,a=e,e.indexOf(n.numeralDecimalMark)>=0&&(a=(t=e.split(n.numeralDecimalMark))[0],o=n.numeralDecimalMark+t[1].slice(0,n.numeralDecimalScale)),r==="-"&&(a=a.slice(1)),n.numeralIntegerScale>0&&(a=a.slice(0,n.numeralIntegerScale)),n.numeralThousandsGroupStyle){case v.groupStyle.lakh:a=a.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+n.delimiter);break;case v.groupStyle.wan:a=a.replace(/(\d)(?=(\d{4})+$)/g,"$1"+n.delimiter);break;case v.groupStyle.thousand:a=a.replace(/(\d)(?=(\d{3})+$)/g,"$1"+n.delimiter)}return n.tailPrefix?r+a.toString()+(n.numeralDecimalScale>0?o.toString():"")+n.prefix:i+a.toString()+(n.numeralDecimalScale>0?o.toString():"")}};var k=v,F=function(e,t,r){var i=this;i.date=[],i.blocks=[],i.datePattern=e,i.dateMin=t.split("-").reverse().map(function(a){return parseInt(a,10)}),i.dateMin.length===2&&i.dateMin.unshift(0),i.dateMax=r.split("-").reverse().map(function(a){return parseInt(a,10)}),i.dateMax.length===2&&i.dateMax.unshift(0),i.initBlocks()};F.prototype={initBlocks:function(){var e=this;e.datePattern.forEach(function(t){t==="Y"?e.blocks.push(4):e.blocks.push(2)})},getISOFormatDate:function(){var e=this,t=e.date;return t[2]?t[2]+"-"+e.addLeadingZero(t[1])+"-"+e.addLeadingZero(t[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(e){var t=this,r="";return e=e.replace(/[^\d]/g,""),t.blocks.forEach(function(i,a){if(e.length>0){var n=e.slice(0,i),o=n.slice(0,1),l=e.slice(i);switch(t.datePattern[a]){case"d":n==="00"?n="01":parseInt(o,10)>3?n="0"+o:parseInt(n,10)>31&&(n="31");break;case"m":n==="00"?n="01":parseInt(o,10)>1?n="0"+o:parseInt(n,10)>12&&(n="12")}r+=n,e=l}}),this.getFixedDateString(r)},getFixedDateString:function(e){var t,r,i,a=this,n=a.datePattern,o=[],l=0,d=0,p=0,s=0,u=0,m=0,y=!1;return e.length===4&&n[0].toLowerCase()!=="y"&&n[1].toLowerCase()!=="y"&&(u=2-(s=n[0]==="d"?0:2),t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),o=this.getFixedDate(t,r,0)),e.length===8&&(n.forEach(function(f,C){switch(f){case"d":l=C;break;case"m":d=C;break;default:p=C}}),m=2*p,s=l<=p?2*l:2*l+2,u=d<=p?2*d:2*d+2,t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+4),10),y=e.slice(m,m+4).length===4,o=this.getFixedDate(t,r,i)),e.length!==4||n[0]!=="y"&&n[1]!=="y"||(m=2-(u=n[0]==="m"?0:2),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),y=e.slice(m,m+2).length===2,o=[0,r,i]),e.length!==6||n[0]!=="Y"&&n[1]!=="Y"||(m=2-.5*(u=n[0]==="m"?0:4),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+4),10),y=e.slice(m,m+4).length===4,o=[0,r,i]),o=a.getRangeFixedDate(o),a.date=o,o.length===0?e:n.reduce(function(f,C){switch(C){case"d":return f+(o[0]===0?"":a.addLeadingZero(o[0]));case"m":return f+(o[1]===0?"":a.addLeadingZero(o[1]));case"y":return f+(y?a.addLeadingZeroForYear(o[2],!1):"");case"Y":return f+(y?a.addLeadingZeroForYear(o[2],!0):"")}},"")},getRangeFixedDate:function(e){var t=this,r=t.datePattern,i=t.dateMin||[],a=t.dateMax||[];return!e.length||i.length<3&&a.length<3||r.find(function(n){return n.toLowerCase()==="y"})&&e[2]===0?e:a.length&&(a[2]<e[2]||a[2]===e[2]&&(a[1]<e[1]||a[1]===e[1]&&a[0]<e[0]))?a:i.length&&(i[2]>e[2]||i[2]===e[2]&&(i[1]>e[1]||i[1]===e[1]&&i[0]>e[0]))?i:e},getFixedDate:function(e,t,r){return e=Math.min(e,31),t=Math.min(t,12),r=parseInt(r||0,10),(t<7&&t%2==0||t>8&&t%2==1)&&(e=Math.min(e,t===2?this.isLeapYear(r)?29:28:30)),[e,t,r]},isLeapYear:function(e){return e%4==0&&e%100!=0||e%400==0},addLeadingZero:function(e){return(e<10?"0":"")+e},addLeadingZeroForYear:function(e,t){return t?(e<10?"000":e<100?"00":e<1e3?"0":"")+e:(e<10?"0":"")+e}};var V=F,P=function(e,t){var r=this;r.time=[],r.blocks=[],r.timePattern=e,r.timeFormat=t,r.initBlocks()};P.prototype={initBlocks:function(){var e=this;e.timePattern.forEach(function(){e.blocks.push(2)})},getISOFormatTime:function(){var e=this,t=e.time;return t[2]?e.addLeadingZero(t[0])+":"+e.addLeadingZero(t[1])+":"+e.addLeadingZero(t[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){return String(this.timeFormat)==="12"?{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}:{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(e){var t=this,r="";e=e.replace(/[^\d]/g,"");var i=t.getTimeFormatOptions();return t.blocks.forEach(function(a,n){if(e.length>0){var o=e.slice(0,a),l=o.slice(0,1),d=e.slice(a);switch(t.timePattern[n]){case"h":parseInt(l,10)>i.maxHourFirstDigit?o="0"+l:parseInt(o,10)>i.maxHours&&(o=i.maxHours+"");break;case"m":case"s":parseInt(l,10)>i.maxMinutesFirstDigit?o="0"+l:parseInt(o,10)>i.maxMinutes&&(o=i.maxMinutes+"")}r+=o,e=d}}),this.getFixedTimeString(r)},getFixedTimeString:function(e){var t,r,i,a=this,n=a.timePattern,o=[],l=0,d=0,p=0,s=0,u=0,m=0;return e.length===6&&(n.forEach(function(y,f){switch(y){case"s":l=2*f;break;case"m":d=2*f;break;case"h":p=2*f}}),m=p,u=d,s=l,t=parseInt(e.slice(s,s+2),10),r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),o=this.getFixedTime(i,r,t)),e.length===4&&a.timePattern.indexOf("s")<0&&(n.forEach(function(y,f){switch(y){case"m":d=2*f;break;case"h":p=2*f}}),m=p,u=d,t=0,r=parseInt(e.slice(u,u+2),10),i=parseInt(e.slice(m,m+2),10),o=this.getFixedTime(i,r,t)),a.time=o,o.length===0?e:n.reduce(function(y,f){switch(f){case"s":return y+a.addLeadingZero(o[2]);case"m":return y+a.addLeadingZero(o[1]);case"h":return y+a.addLeadingZero(o[0])}},"")},getFixedTime:function(e,t,r){return r=Math.min(parseInt(r||0,10),60),t=Math.min(t,60),[e=Math.min(e,60),t,r]},addLeadingZero:function(e){return(e<10?"0":"")+e}};var L=P,I=function(e,t){var r=this;r.delimiter=t||t===""?t:" ",r.delimiterRE=t?new RegExp("\\"+t,"g"):"",r.formatter=e};I.prototype={setFormatter:function(e){this.formatter=e},format:function(e){var t=this;t.formatter.clear();for(var r,i="",a=!1,n=0,o=(e=(e=(e=e.replace(/[^\d+]/g,"")).replace(/^\+/,"B").replace(/\+/g,"").replace("B","+")).replace(t.delimiterRE,"")).length;n<o;n++)r=t.formatter.inputDigit(e.charAt(n)),/[\s()-]/g.test(r)?(i=r,a=!0):a||(i=r);return i=(i=i.replace(/[()]/g,"")).replace(/[\s-]/g,t.delimiter)}};var M=I,b={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^(62|81)\d{0,14}/},getStrictBlocks:function(e){var t=e.reduce(function(r,i){return r+i},0);return e.concat(19-t)},getInfo:function(e,t){var r=b.blocks,i=b.re;for(var a in t=!!t,i)if(i[a].test(e)){var n=r[a];return{type:a,blocks:t?this.getStrictBlocks(n):n}}return{type:"unknown",blocks:t?this.getStrictBlocks(r.general):r.general}}},N=b,E={noop:function(){},strip:function(e,t){return e.replace(t,"")},getPostDelimiter:function(e,t,r){if(r.length===0)return e.slice(-t.length)===t?t:"";var i="";return r.forEach(function(a){e.slice(-a.length)===a&&(i=a)}),i},getDelimiterREByDelimiter:function(e){return new RegExp(e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g")},getNextCursorPosition:function(e,t,r,i,a){return t.length===e?r.length:e+this.getPositionOffset(e,t,r,i,a)},getPositionOffset:function(e,t,r,i,a){var n,o,l;return n=this.stripDelimiters(t.slice(0,e),i,a),o=this.stripDelimiters(r.slice(0,e),i,a),(l=n.length-o.length)!==0?l/Math.abs(l):0},stripDelimiters:function(e,t,r){var i=this;if(r.length===0){var a=t?i.getDelimiterREByDelimiter(t):"";return e.replace(a,"")}return r.forEach(function(n){n.split("").forEach(function(o){e=e.replace(i.getDelimiterREByDelimiter(o),"")})}),e},headStr:function(e,t){return e.slice(0,t)},getMaxLength:function(e){return e.reduce(function(t,r){return t+r},0)},getPrefixStrippedValue:function(e,t,r,i,a,n,o,l,d){if(r===0)return e;if(e===t&&e!=="")return"";if(d&&e.slice(0,1)=="-"){var p=i.slice(0,1)=="-"?i.slice(1):i;return"-"+this.getPrefixStrippedValue(e.slice(1),t,r,p,a,n,o,l,d)}if(i.slice(0,r)!==t&&!l||i.slice(-r)!==t&&l)return o&&!i&&e?e:"";var s=this.stripDelimiters(i,a,n);return e.slice(0,r)===t||l?e.slice(-r)!==t&&l?s.slice(0,-r-1):l?e.slice(0,-r):e.slice(r):s.slice(r)},getFirstDiffIndex:function(e,t){for(var r=0;e.charAt(r)===t.charAt(r);)if(e.charAt(r++)==="")return-1;return r},getFormattedValue:function(e,t,r,i,a,n){var o="",l=a.length>0,d="";return r===0?e:(t.forEach(function(p,s){if(e.length>0){var u=e.slice(0,p),m=e.slice(p);d=l?a[n?s-1:s]||d:i,n?(s>0&&(o+=d),o+=u):(o+=u,u.length===p&&s<r-1&&(o+=d)),e=m}}),o)},fixPrefixCursor:function(e,t,r,i){if(e){var a=e.value,n=r||i[0]||" ";if(e.setSelectionRange&&t&&!(t.length+n.length<=a.length)){var o=2*a.length;setTimeout(function(){e.setSelectionRange(o,o)},1)}}},checkFullSelection:function(e){try{return(window.getSelection()||document.getSelection()||{}).toString().length===e.length}catch{}return!1},setSelection:function(e,t,r){if(e===this.getActiveElement(r)&&!(e&&e.value.length<=t))if(e.createTextRange){var i=e.createTextRange();i.move("character",t),i.select()}else try{e.setSelectionRange(t,t)}catch{}},getActiveElement:function(e){var t=e.activeElement;return t&&t.shadowRoot?this.getActiveElement(t.shadowRoot):t},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(e,t){return!!(this.isAndroid()&&e&&t)&&t===e.slice(0,-1)}},T={assign:function(e,t){return t=t||{},(e=e||{}).creditCard=!!t.creditCard,e.creditCardStrictMode=!!t.creditCardStrictMode,e.creditCardType="",e.onCreditCardTypeChanged=t.onCreditCardTypeChanged||function(){},e.phone=!!t.phone,e.phoneRegionCode=t.phoneRegionCode||"AU",e.phoneFormatter={},e.time=!!t.time,e.timePattern=t.timePattern||["h","m","s"],e.timeFormat=t.timeFormat||"24",e.timeFormatter={},e.date=!!t.date,e.datePattern=t.datePattern||["d","m","Y"],e.dateMin=t.dateMin||"",e.dateMax=t.dateMax||"",e.dateFormatter={},e.numeral=!!t.numeral,e.numeralIntegerScale=t.numeralIntegerScale>0?t.numeralIntegerScale:0,e.numeralDecimalScale=t.numeralDecimalScale>=0?t.numeralDecimalScale:2,e.numeralDecimalMark=t.numeralDecimalMark||".",e.numeralThousandsGroupStyle=t.numeralThousandsGroupStyle||"thousand",e.numeralPositiveOnly=!!t.numeralPositiveOnly,e.stripLeadingZeroes=t.stripLeadingZeroes!==!1,e.signBeforePrefix=!!t.signBeforePrefix,e.tailPrefix=!!t.tailPrefix,e.swapHiddenInput=!!t.swapHiddenInput,e.numericOnly=e.creditCard||e.date||!!t.numericOnly,e.uppercase=!!t.uppercase,e.lowercase=!!t.lowercase,e.prefix=e.creditCard||e.date?"":t.prefix||"",e.noImmediatePrefix=!!t.noImmediatePrefix,e.prefixLength=e.prefix.length,e.rawValueTrimPrefix=!!t.rawValueTrimPrefix,e.copyDelimiter=!!t.copyDelimiter,e.initValue=t.initValue!==void 0&&t.initValue!==null?t.initValue.toString():"",e.delimiter=t.delimiter||t.delimiter===""?t.delimiter:t.date?"/":t.time?":":t.numeral?",":(t.phone," "),e.delimiterLength=e.delimiter.length,e.delimiterLazyShow=!!t.delimiterLazyShow,e.delimiters=t.delimiters||[],e.blocks=t.blocks||[],e.blocksLength=e.blocks.length,e.root=typeof x=="object"&&x?x:window,e.document=t.document||e.root.document,e.maxLength=0,e.backspace=!1,e.result="",e.onValueChanged=t.onValueChanged||function(){},e}},c=function(e,t){var r=this;if(typeof e=="string"?(r.element=document.querySelector(e),document.querySelectorAll(e).length>1):e.length!==void 0&&e.length>0?(r.element=e[0],e.length>1):r.element=e,!r.element)throw new Error("[cleave.js] Please check the element");t.initValue=r.element.value,r.properties=c.DefaultProperties.assign({},t),r.init()};c.prototype={init:function(){var e=this,t=e.properties;t.numeral||t.phone||t.creditCard||t.time||t.date||t.blocksLength!==0||t.prefix?(t.maxLength=c.Util.getMaxLength(t.blocks),e.isAndroid=c.Util.isAndroid(),e.lastInputValue="",e.isBackward="",e.onChangeListener=e.onChange.bind(e),e.onKeyDownListener=e.onKeyDown.bind(e),e.onFocusListener=e.onFocus.bind(e),e.onCutListener=e.onCut.bind(e),e.onCopyListener=e.onCopy.bind(e),e.initSwapHiddenInput(),e.element.addEventListener("input",e.onChangeListener),e.element.addEventListener("keydown",e.onKeyDownListener),e.element.addEventListener("focus",e.onFocusListener),e.element.addEventListener("cut",e.onCutListener),e.element.addEventListener("copy",e.onCopyListener),e.initPhoneFormatter(),e.initDateFormatter(),e.initTimeFormatter(),e.initNumeralFormatter(),(t.initValue||t.prefix&&!t.noImmediatePrefix)&&e.onInput(t.initValue)):e.onInput(t.initValue)},initSwapHiddenInput:function(){var e=this;if(e.properties.swapHiddenInput){var t=e.element.cloneNode(!0);e.element.parentNode.insertBefore(t,e.element),e.elementSwapHidden=e.element,e.elementSwapHidden.type="hidden",e.element=t,e.element.id=""}},initNumeralFormatter:function(){var e=this.properties;e.numeral&&(e.numeralFormatter=new c.NumeralFormatter(e.numeralDecimalMark,e.numeralIntegerScale,e.numeralDecimalScale,e.numeralThousandsGroupStyle,e.numeralPositiveOnly,e.stripLeadingZeroes,e.prefix,e.signBeforePrefix,e.tailPrefix,e.delimiter))},initTimeFormatter:function(){var e=this.properties;e.time&&(e.timeFormatter=new c.TimeFormatter(e.timePattern,e.timeFormat),e.blocks=e.timeFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=c.Util.getMaxLength(e.blocks))},initDateFormatter:function(){var e=this.properties;e.date&&(e.dateFormatter=new c.DateFormatter(e.datePattern,e.dateMin,e.dateMax),e.blocks=e.dateFormatter.getBlocks(),e.blocksLength=e.blocks.length,e.maxLength=c.Util.getMaxLength(e.blocks))},initPhoneFormatter:function(){var e=this.properties;if(e.phone)try{e.phoneFormatter=new c.PhoneFormatter(new e.root.Cleave.AsYouTypeFormatter(e.phoneRegionCode),e.delimiter)}catch{throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(e){var t=this,r=e.which||e.keyCode;t.lastInputValue=t.element.value,t.isBackward=r===8},onChange:function(e){var t=this,r=t.properties,i=c.Util;t.isBackward=t.isBackward||e.inputType==="deleteContentBackward";var a=i.getPostDelimiter(t.lastInputValue,r.delimiter,r.delimiters);t.isBackward&&a?r.postDelimiterBackspace=a:r.postDelimiterBackspace=!1,this.onInput(this.element.value)},onFocus:function(){var e=this,t=e.properties;e.lastInputValue=e.element.value,t.prefix&&t.noImmediatePrefix&&!e.element.value&&this.onInput(t.prefix),c.Util.fixPrefixCursor(e.element,t.prefix,t.delimiter,t.delimiters)},onCut:function(e){c.Util.checkFullSelection(this.element.value)&&(this.copyClipboardData(e),this.onInput(""))},onCopy:function(e){c.Util.checkFullSelection(this.element.value)&&this.copyClipboardData(e)},copyClipboardData:function(e){var t=this.properties,r=c.Util,i=this.element.value,a="";a=t.copyDelimiter?i:r.stripDelimiters(i,t.delimiter,t.delimiters);try{e.clipboardData?e.clipboardData.setData("Text",a):window.clipboardData.setData("Text",a),e.preventDefault()}catch{}},onInput:function(e){var t=this,r=t.properties,i=c.Util,a=i.getPostDelimiter(e,r.delimiter,r.delimiters);return r.numeral||!r.postDelimiterBackspace||a||(e=i.headStr(e,e.length-r.postDelimiterBackspace.length)),r.phone?(!r.prefix||r.noImmediatePrefix&&!e.length?r.result=r.phoneFormatter.format(e):r.result=r.prefix+r.phoneFormatter.format(e).slice(r.prefix.length),void t.updateValueState()):r.numeral?(r.prefix&&r.noImmediatePrefix&&e.length===0?r.result="":r.result=r.numeralFormatter.format(e),void t.updateValueState()):(r.date&&(e=r.dateFormatter.getValidatedDate(e)),r.time&&(e=r.timeFormatter.getValidatedTime(e)),e=i.stripDelimiters(e,r.delimiter,r.delimiters),e=i.getPrefixStrippedValue(e,r.prefix,r.prefixLength,r.result,r.delimiter,r.delimiters,r.noImmediatePrefix,r.tailPrefix,r.signBeforePrefix),e=r.numericOnly?i.strip(e,/[^\d]/g):e,e=r.uppercase?e.toUpperCase():e,e=r.lowercase?e.toLowerCase():e,r.prefix&&(r.tailPrefix?e+=r.prefix:e=r.prefix+e,r.blocksLength===0)?(r.result=e,void t.updateValueState()):(r.creditCard&&t.updateCreditCardPropsByValue(e),e=i.headStr(e,r.maxLength),r.result=i.getFormattedValue(e,r.blocks,r.blocksLength,r.delimiter,r.delimiters,r.delimiterLazyShow),void t.updateValueState()))},updateCreditCardPropsByValue:function(e){var t,r=this.properties,i=c.Util;i.headStr(r.result,4)!==i.headStr(e,4)&&(t=c.CreditCardDetector.getInfo(e,r.creditCardStrictMode),r.blocks=t.blocks,r.blocksLength=r.blocks.length,r.maxLength=i.getMaxLength(r.blocks),r.creditCardType!==t.type&&(r.creditCardType=t.type,r.onCreditCardTypeChanged.call(this,r.creditCardType)))},updateValueState:function(){var e=this,t=c.Util,r=e.properties;if(e.element){var i=e.element.selectionEnd,a=e.element.value,n=r.result;i=t.getNextCursorPosition(i,a,n,r.delimiter,r.delimiters),e.isAndroid?window.setTimeout(function(){e.element.value=n,t.setSelection(e.element,i,r.document,!1),e.callOnValueChanged()},1):(e.element.value=n,r.swapHiddenInput&&(e.elementSwapHidden.value=e.getRawValue()),t.setSelection(e.element,i,r.document,!1),e.callOnValueChanged())}},callOnValueChanged:function(){var e=this,t=e.properties;t.onValueChanged.call(e,{target:{name:e.element.name,value:t.result,rawValue:e.getRawValue()}})},setPhoneRegionCode:function(e){var t=this;t.properties.phoneRegionCode=e,t.initPhoneFormatter(),t.onChange()},setRawValue:function(e){var t=this,r=t.properties;e=e!=null?e.toString():"",r.numeral&&(e=e.replace(".",r.numeralDecimalMark)),r.postDelimiterBackspace=!1,t.element.value=e,t.onInput(e)},getRawValue:function(){var e=this.properties,t=c.Util,r=this.element.value;return e.rawValueTrimPrefix&&(r=t.getPrefixStrippedValue(r,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)),r=e.numeral?e.numeralFormatter.getRawValue(r):t.stripDelimiters(r,e.delimiter,e.delimiters)},getISOFormatDate:function(){var e=this.properties;return e.date?e.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var e=this.properties;return e.time?e.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var e=this;e.element.removeEventListener("input",e.onChangeListener),e.element.removeEventListener("keydown",e.onKeyDownListener),e.element.removeEventListener("focus",e.onFocusListener),e.element.removeEventListener("cut",e.onCutListener),e.element.removeEventListener("copy",e.onCopyListener)},toString:function(){return"[Cleave Object]"}},c.NumeralFormatter=k,c.DateFormatter=V,c.TimeFormatter=L,c.PhoneFormatter=M,c.CreditCardDetector=N,c.Util=E,c.DefaultProperties=T,(typeof x=="object"&&x?x:window).Cleave=c;var S=c,B=Object.defineProperty,R=Object.getOwnPropertyDescriptor,g=(e,t,r,i)=>{for(var a,n=i>1?void 0:i?R(t,r):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(i?a(t,r,n):a(n))||n);return i&&n&&B(t,r,n),n};exports.SchmancyPaymentCardForm=class extends w.$LitElement(){constructor(){super(...arguments),this.value={cardName:"",cardNumber:"",expirationDate:"",cvv:""},this.cardType="",this.isCardNameValid=!0,this.isCardNumberValid=!0,this.isExpirationDateValid=!0,this.isCvvValid=!0}firstUpdated(){new S(this.cardNumberInput,{creditCard:!0,creditCardStrictMode:!0,onCreditCardTypeChanged:e=>{this.cardType=e,e==="unknown"?(this.isCardNumberValid=!1,this.cardNumberInput.setCustomValidity("Please enter a valid card number."),this.cardNumberInput.error=!0):(this.isCardNumberValid=!0,this.cardNumberInput.setCustomValidity(""),this.cardNumberInput.error=!1,this.cvvInput.maxlength=e==="amex"?4:3)}}),new S(this.expirationDateInput,{date:!0,datePattern:["m","y"],onValueChanged:e=>{const t=e.target.value;if(!t||t.length<5)this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity("Please enter a valid expiration date (MM/YY)."),this.expirationDateInput.error=!0;else{const[r,i]=t.split("/"),a=new Date,n=a.getFullYear()%100,o=a.getMonth()+1,l=parseInt(r,10),d=parseInt(i,10);d<n||d===n&&l<o?(this.isExpirationDateValid=!1,this.expirationDateInput.setCustomValidity("Card has expired."),this.expirationDateInput.error=!0):(this.isExpirationDateValid=!0,this.expirationDateInput.setCustomValidity(""),this.expirationDateInput.error=!1)}}}),new S(this.cvvInput,{blocks:[4],numericOnly:!0,onValueChanged:e=>{const t=this.cardType==="amex"?4:3;e.target.value.length<t?(this.isCvvValid=!1,this.cvvInput.setCustomValidity(`Please enter a valid ${t}-digit CVV.`),this.cvvInput.error=!0):(this.isCvvValid=!0,this.cvvInput.setCustomValidity(""),this.cvvInput.error=!1)}}),new S(this.cardNameInput,{uppercase:!0,delimiter:" ",onValueChanged:e=>{!e.target.value||e.target.value.length<3?(this.isCardNameValid=!1,this.cardNameInput.setCustomValidity("Please enter the name as it appears on the card."),this.cardNameInput.error=!0):(this.isCardNameValid=!0,this.cardNameInput.setCustomValidity(""),this.cardNameInput.error=!1)}})}reportValidity(){return this.form.reportValidity()}checkValidity(){return!!this.form.reportValidity()}emitChange(){this.dispatchEvent(new CustomEvent("change",{detail:{...this.value},bubbles:!0}))}render(){const e=this.getCardIcon();return D.html`
|
|
2
2
|
<schmancy-form
|
|
3
3
|
@change=${t=>{t.stopPropagation(),t.preventDefault()}}
|
|
4
4
|
>
|
|
@@ -71,4 +71,4 @@
|
|
|
71
71
|
<span>Your payment information is secure and encrypted</span>
|
|
72
72
|
</div>
|
|
73
73
|
`}},g([h.property({type:Object,reflect:!0})],exports.SchmancyPaymentCardForm.prototype,"value",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"cardType",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"cardName",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"cardNumber",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"expirationDate",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"cvv",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"isCardNameValid",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"isCardNumberValid",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"isExpirationDateValid",2),g([h.state()],exports.SchmancyPaymentCardForm.prototype,"isCvvValid",2),g([h.query("#cardNumber")],exports.SchmancyPaymentCardForm.prototype,"cardNumberInput",2),g([h.query("#expirationDate")],exports.SchmancyPaymentCardForm.prototype,"expirationDateInput",2),g([h.query("#cvv")],exports.SchmancyPaymentCardForm.prototype,"cvvInput",2),g([h.query("#cardName")],exports.SchmancyPaymentCardForm.prototype,"cardNameInput",2),g([h.query("schmancy-form")],exports.SchmancyPaymentCardForm.prototype,"form",2),exports.SchmancyPaymentCardForm=g([h.customElement("schmancy-payment-card-form")],exports.SchmancyPaymentCardForm);
|
|
74
|
-
//# sourceMappingURL=payment-card-form-
|
|
74
|
+
//# sourceMappingURL=payment-card-form-BJooohMJ.cjs.map
|